Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,24 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def estimate_ac_capacity(length, width, height):
|
| 4 |
-
#
|
| 5 |
volume = length * width * height
|
| 6 |
-
# Adjusted
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
demo = gr.Interface(
|
| 12 |
fn=estimate_ac_capacity,
|
|
@@ -16,11 +28,11 @@ demo = gr.Interface(
|
|
| 16 |
gr.Number(label="Height (feet)")
|
| 17 |
],
|
| 18 |
outputs="text",
|
| 19 |
-
title="AC Capacity Estimator
|
| 20 |
description=(
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
)
|
| 24 |
)
|
| 25 |
|
| 26 |
-
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
def estimate_ac_capacity(length, width, height):
|
| 4 |
+
# Room volume-based cooling load
|
| 5 |
volume = length * width * height
|
| 6 |
+
room_btu = volume * 0.16 # Adjusted for Punjab summer
|
| 7 |
+
|
| 8 |
+
# Equipment heat load (BTU/hr)
|
| 9 |
+
rectifier_btu = 6 * 3000 # 6 rectifier cabins
|
| 10 |
+
dry_tr_btu = 2 * 2000 # 2 dry-type transformers
|
| 11 |
+
wet_tr_btu = 4 * 1500 # 4 wet-type transformers
|
| 12 |
+
equipment_btu = rectifier_btu + dry_tr_btu + wet_tr_btu
|
| 13 |
+
|
| 14 |
+
# Total BTU/hr and tonnage
|
| 15 |
+
total_btu = room_btu + equipment_btu
|
| 16 |
+
tons = total_btu / 12000
|
| 17 |
+
|
| 18 |
+
return (
|
| 19 |
+
f"Estimated AC Capacity: {total_btu:.0f} BTU/hr ({tons:.2f} tons)\n"
|
| 20 |
+
f"(Room load: {room_btu:.0f} BTU/hr, Equipment load: {equipment_btu} BTU/hr)"
|
| 21 |
+
)
|
| 22 |
|
| 23 |
demo = gr.Interface(
|
| 24 |
fn=estimate_ac_capacity,
|
|
|
|
| 28 |
gr.Number(label="Height (feet)")
|
| 29 |
],
|
| 30 |
outputs="text",
|
| 31 |
+
title="AC Capacity Estimator with Equipment Load",
|
| 32 |
description=(
|
| 33 |
+
"Estimate AC capacity needed to keep room temperature < 40°C in Punjab summer conditions. "
|
| 34 |
+
"This includes heat from 6 rectifier cabins, 2 dry-type transformers, and 4 wet-type transformers used for NaClO generator operation."
|
| 35 |
)
|
| 36 |
)
|
| 37 |
|
| 38 |
+
demo.launch()
|