Spaces:
Sleeping
Sleeping
Jompatron
commited on
Commit
·
41859c4
1
Parent(s):
f376eb0
working ui
Browse files
app.py
CHANGED
|
@@ -179,22 +179,42 @@ def generate_hindcast_v2(days):
|
|
| 179 |
|
| 180 |
|
| 181 |
with gr.Blocks() as iface:
|
|
|
|
|
|
|
| 182 |
|
| 183 |
-
gr.
|
| 184 |
-
|
|
|
|
| 185 |
|
| 186 |
with gr.Row():
|
| 187 |
-
|
| 188 |
-
|
| 189 |
|
| 190 |
with gr.Row():
|
| 191 |
-
|
| 192 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
|
| 194 |
-
|
| 195 |
-
|
| 196 |
|
| 197 |
-
btn_v1.click(fn=generate_forecast_v1, inputs=forecast_days_v1, outputs=out_v1)
|
| 198 |
-
btn_v2.click(fn=generate_forecast_v2, inputs=forecast_days_v2, outputs=out_v2)
|
| 199 |
|
| 200 |
iface.launch()
|
|
|
|
| 179 |
|
| 180 |
|
| 181 |
with gr.Blocks() as iface:
|
| 182 |
+
|
| 183 |
+
gr.Markdown("# Air Quality Dashboard (Model v1 & Model v2)")
|
| 184 |
|
| 185 |
+
with gr.Row():
|
| 186 |
+
gr.Markdown("### **Model v1 (No lag features)**")
|
| 187 |
+
gr.Markdown("### **Model v2 (Lag-aware)**")
|
| 188 |
|
| 189 |
with gr.Row():
|
| 190 |
+
days_v1_f = gr.Slider(3, 10, value=7, label="Forecast Days (v1)")
|
| 191 |
+
days_v2_f = gr.Slider(3, 10, value=7, label="Forecast Days (v2)")
|
| 192 |
|
| 193 |
with gr.Row():
|
| 194 |
+
btn_v1_f = gr.Button("Generate Forecast (v1)")
|
| 195 |
+
btn_v2_f = gr.Button("Generate Forecast (v2)")
|
| 196 |
+
|
| 197 |
+
out_v1_f = gr.Image()
|
| 198 |
+
out_v2_f = gr.Image()
|
| 199 |
+
|
| 200 |
+
btn_v1_f.click(generate_forecast_v1, inputs=days_v1_f, outputs=out_v1_f)
|
| 201 |
+
btn_v2_f.click(generate_forecast_v2, inputs=days_v2_f, outputs=out_v2_f)
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
# HINDCAST
|
| 205 |
+
with gr.Row():
|
| 206 |
+
days_v1_h = gr.Slider(3, 10, value=7, label="Hindcast Days (v1)")
|
| 207 |
+
days_v2_h = gr.Slider(3, 10, value=7, label="Hindcast Days (v2)")
|
| 208 |
+
|
| 209 |
+
with gr.Row():
|
| 210 |
+
btn_v1_h = gr.Button("Generate Hindcast (v1)")
|
| 211 |
+
btn_v2_h = gr.Button("Generate Hindcast (v2)")
|
| 212 |
+
|
| 213 |
+
out_v1_h = gr.Image()
|
| 214 |
+
out_v2_h = gr.Image()
|
| 215 |
|
| 216 |
+
btn_v1_h.click(generate_hindcast_v1, inputs=days_v1_h, outputs=out_v1_h)
|
| 217 |
+
btn_v2_h.click(generate_hindcast_v2, inputs=days_v2_h, outputs=out_v2_h)
|
| 218 |
|
|
|
|
|
|
|
| 219 |
|
| 220 |
iface.launch()
|