howlbz commited on
Commit
82627a9
·
1 Parent(s): 4b1a293

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
app.py CHANGED
@@ -35,8 +35,13 @@ def forecast():
35
 
36
  today_data = X[1:2]
37
  y = model.predict(today_data)
38
-
39
- return y
 
 
 
 
 
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="Result: "))
 
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()