VIATEUR-AI commited on
Commit
1678cd1
·
verified ·
1 Parent(s): f513458

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -59,4 +59,14 @@ with gr.Blocks() as demo:
59
  gr.Markdown("## Climate Control System - Igenzura ry'Ubushyuhe, Umuyaga, na Windows")
60
 
61
  temperature = gr.Slider(0, 50, step=1, label="Ubushyuhe (°C)", value=22)
62
- humidity = gr.Slider(0, 100, step=1, label="Humidity (%)", valu
 
 
 
 
 
 
 
 
 
 
 
59
  gr.Markdown("## Climate Control System - Igenzura ry'Ubushyuhe, Umuyaga, na Windows")
60
 
61
  temperature = gr.Slider(0, 50, step=1, label="Ubushyuhe (°C)", value=22)
62
+ humidity = gr.Slider(0, 100, step=1, label="Humidity (%)", value=40) # hano wasize 'value' utuzuye
63
+
64
+ output = gr.Textbox(label="Ibisubizo bya System", lines=12)
65
+
66
+ temperature.change(fn=climate_control, inputs=[temperature, humidity], outputs=output)
67
+ humidity.change(fn=climate_control, inputs=[temperature, humidity], outputs=output)
68
+
69
+ output.value = climate_control(temperature.value, humidity.value)
70
+
71
+ demo.launch()
72
+