Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,13 @@ def forecast():
|
|
35 |
|
36 |
today_data = X[1:2]
|
37 |
y = model.predict(today_data)
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
demo = gr.Interface(
|
42 |
fn=forecast,
|
@@ -44,6 +49,7 @@ demo = gr.Interface(
|
|
44 |
description="Get aqi value",
|
45 |
allow_flagging="never",
|
46 |
inputs=[],
|
47 |
-
outputs=gr.Textbox(label=
|
|
|
48 |
|
49 |
demo.launch()
|
|
|
35 |
|
36 |
today_data = X[1:2]
|
37 |
y = model.predict(today_data)
|
38 |
+
|
39 |
+
res = int(y[0])
|
40 |
+
return res
|
41 |
+
|
42 |
+
date_today = datetime.now().strftime("%Y-%m-%d")
|
43 |
+
|
44 |
+
output_label = date_today + " 's air quality is '"
|
45 |
|
46 |
demo = gr.Interface(
|
47 |
fn=forecast,
|
|
|
49 |
description="Get aqi value",
|
50 |
allow_flagging="never",
|
51 |
inputs=[],
|
52 |
+
outputs=gr.Textbox(label=output_label))
|
53 |
+
|
54 |
|
55 |
demo.launch()
|