Spaces:
Runtime error
Runtime error
sharner
commited on
Commit
·
72eb83c
1
Parent(s):
1932b3d
Preparing code for app
Browse files- app.py +38 -0
- requirements.txt +2 -0
app.py
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from PIL import Image
|
3 |
+
import hopsworks
|
4 |
+
|
5 |
+
# project = hopsworks.login()
|
6 |
+
# fs = project.get_feature_store()
|
7 |
+
|
8 |
+
# dataset_api = project.get_dataset_api()
|
9 |
+
|
10 |
+
# dataset_api.download("Resources/images/news_image.png")
|
11 |
+
# dataset_api.download("Resources/images/general_sentiment_history.png")
|
12 |
+
# dataset_api.download("Resources/images/demo_sentiment_history.png")
|
13 |
+
|
14 |
+
# news_headline = ...
|
15 |
+
# news_source = ..
|
16 |
+
# news_article = ...
|
17 |
+
|
18 |
+
with gr.Blocks() as demo:
|
19 |
+
gr.Markdown("# The Delight Dispatch ☀️🗞️")
|
20 |
+
# gr.Markdown("## Today's News: " + news_headline)
|
21 |
+
# gr.Markdown("Reported by: " + news_source)
|
22 |
+
|
23 |
+
# with gr.Row():
|
24 |
+
# input_img = gr.Image("news_image.png", elem_id="news-img")
|
25 |
+
# gr.Label("Image by DALL-E 3")
|
26 |
+
|
27 |
+
# with gr.Row():
|
28 |
+
# gr.Markdown(news_article)
|
29 |
+
|
30 |
+
# with gr.Row():
|
31 |
+
# with gr.Column():
|
32 |
+
# gr.Label("Sentiment History of News in General")
|
33 |
+
# input_img = gr.Image("general_sentiment_history.png", elem_id="general-history")
|
34 |
+
# with gr.Column():
|
35 |
+
# gr.Label("Sentiment History of News on this Demo")
|
36 |
+
# input_img = gr.Image("demo_sentiment_history.png", elem_id="demo-history")
|
37 |
+
|
38 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
hopsworks
|
2 |
+
httpx==0.24.1
|