Engr-arehmankhan786 commited on
Commit
785637c
·
verified ·
1 Parent(s): add377a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def estimate_ac_capacity(length, width, height):
4
+ # Volume of the room in cubic feet
5
+ volume = length * width * height
6
+ # Rule of thumb: 20 BTU per square foot or 0.133 BTU per cubic foot
7
+ btu = volume * 0.133 # You can adjust this factor for more precision
8
+ tons = btu / 12000 # 1 ton = 12,000 BTU/hr
9
+ return f"Estimated AC Capacity: {btu:.0f} BTU/hr ({tons:.2f} tons)"
10
+
11
+ demo = gr.Interface(
12
+ fn=estimate_ac_capacity,
13
+ inputs=[
14
+ gr.Number(label="Length (feet)"),
15
+ gr.Number(label="Width (feet)"),
16
+ gr.Number(label="Height (feet)")
17
+ ],
18
+ outputs="text",
19
+ title="AC Capacity Estimator",
20
+ description="Enter the room dimensions to estimate the air conditioning capacity needed."
21
+ )
22
+
23
+ demo.launch()