Spaces:
Running
Running
changes
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import numpy as np
|
|
4 |
import random
|
5 |
import os
|
6 |
import hopsworks
|
|
|
7 |
|
8 |
from datetime import datetime, timedelta
|
9 |
now = datetime.now()
|
@@ -26,6 +27,8 @@ print(air_quality_df)
|
|
26 |
|
27 |
with gr.Blocks() as demo:
|
28 |
gr.Markdown("Helsingborg Air Quality Forecast")
|
29 |
-
|
|
|
|
|
30 |
|
31 |
demo.launch()
|
|
|
4 |
import random
|
5 |
import os
|
6 |
import hopsworks
|
7 |
+
from gradio_datetimerange import DateTimeRange
|
8 |
|
9 |
from datetime import datetime, timedelta
|
10 |
now = datetime.now()
|
|
|
27 |
|
28 |
with gr.Blocks() as demo:
|
29 |
gr.Markdown("Helsingborg Air Quality Forecast")
|
30 |
+
daterange = DateTimeRange(["now - 24h", "now"])
|
31 |
+
plot = gr.LinePlot(air_quality_df, x="date", y="pm25")
|
32 |
+
daterange.bind([plot])
|
33 |
|
34 |
demo.launch()
|