Spaces:
Runtime error
Runtime error
sharner
commited on
Commit
·
74d7c7e
1
Parent(s):
4f82318
Remove some code that is not needed anymore
Browse files- app.py +0 -12
- requirements.txt +0 -3
app.py
CHANGED
@@ -1,15 +1,7 @@
|
|
1 |
-
import PIL
|
2 |
import hopsworks
|
3 |
import pandas as pd
|
4 |
import gradio as gr
|
5 |
from datetime import datetime
|
6 |
-
from huggingface_hub import HfApi
|
7 |
-
from apscheduler.schedulers.background import BackgroundScheduler
|
8 |
-
|
9 |
-
HFAPI = HfApi()
|
10 |
-
|
11 |
-
def restart_space():
|
12 |
-
HFAPI.restart_space(repo_id="DelightNews/the-delight-dispatch-demo")
|
13 |
|
14 |
today = datetime.now().strftime('%Y-%m-%d')
|
15 |
|
@@ -58,8 +50,4 @@ with gr.Blocks() as demo:
|
|
58 |
gr.Label("Sentiment History of News on this Demo")
|
59 |
gr.Image("demo_sentiment_history.png", elem_id="demo-history")
|
60 |
|
61 |
-
scheduler = BackgroundScheduler()
|
62 |
-
scheduler.add_job(restart_space, 'cron', hour=16, minute=27)
|
63 |
-
scheduler.start()
|
64 |
-
|
65 |
demo.launch()
|
|
|
|
|
1 |
import hopsworks
|
2 |
import pandas as pd
|
3 |
import gradio as gr
|
4 |
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
today = datetime.now().strftime('%Y-%m-%d')
|
7 |
|
|
|
50 |
gr.Label("Sentiment History of News on this Demo")
|
51 |
gr.Image("demo_sentiment_history.png", elem_id="demo-history")
|
52 |
|
|
|
|
|
|
|
|
|
53 |
demo.launch()
|
requirements.txt
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
-
pillow
|
2 |
hopsworks
|
3 |
httpx==0.24.1
|
4 |
pandas
|
5 |
datetime
|
6 |
-
huggingface-hub
|
7 |
-
APScheduler
|
|
|
|
|
1 |
hopsworks
|
2 |
httpx==0.24.1
|
3 |
pandas
|
4 |
datetime
|
|
|
|