Robzy commited on
Commit
46779f8
1 Parent(s): 78d370a
Files changed (2) hide show
  1. app.py +3 -3
  2. scheduler.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import numpy as np
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,8 +27,8 @@ print(air_quality_df)
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()
 
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()
scheduler.py CHANGED
@@ -2,6 +2,6 @@ import modal
2
 
3
  app = modal.App('scheduler')
4
 
5
- @app.function(schedule=modal.Period(minutes=1))
6
  def update():
7
- print('Updating...')
 
2
 
3
  app = modal.App('scheduler')
4
 
5
+ @app.function(schedule=modal.Period(seconds=10))
6
  def update():
7
+ print('Updating...')