Spaces:
Runtime error
Runtime error
sharner
commited on
Commit
·
f9febec
1
Parent(s):
72eb83c
Interface preparation
Browse files
app.py
CHANGED
@@ -2,30 +2,35 @@ import gradio as gr
|
|
2 |
from PIL import Image
|
3 |
import hopsworks
|
4 |
|
5 |
-
|
6 |
# fs = project.get_feature_store()
|
7 |
|
8 |
-
|
9 |
|
10 |
-
|
11 |
# dataset_api.download("Resources/images/general_sentiment_history.png")
|
12 |
# dataset_api.download("Resources/images/demo_sentiment_history.png")
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
gr.Markdown("# The Delight Dispatch ☀️🗞️")
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
# gr.Label("Image by DALL-E 3")
|
26 |
|
27 |
-
|
28 |
-
|
29 |
|
30 |
# with gr.Row():
|
31 |
# with gr.Column():
|
|
|
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 = "Lucia celebration at KTH Library"
|
15 |
+
news_source = "KTH Library"
|
16 |
+
news_article = """This year Akademiska hus and KTH Library invites you to a warm and beautiful Lucia celebration in the library hall. We will get to listen to Kongliga Teknologkören (KTH choir) singing traditional Lucia hymns.
|
17 |
+
|
18 |
+
We will also offer traditional Lucia fika, mainly mulled wine (alcohol free), "lussebullar" and ginger bread cookies.
|
19 |
+
|
20 |
+
The Lucia celebration starts 7:30 in the morning. You are welcome to enter the library from 6:50. Please note that this is a popular event that may reach full capacity! First come, first served.
|
21 |
+
"""
|
22 |
|
23 |
with gr.Blocks() as demo:
|
24 |
gr.Markdown("# The Delight Dispatch ☀️🗞️")
|
25 |
+
gr.Markdown("## Today's News: " + news_headline)
|
26 |
+
gr.Markdown("Reported by: " + news_source)
|
27 |
|
28 |
+
with gr.Row():
|
29 |
+
input_img = gr.Image("news_image.png", elem_id="news-img")
|
30 |
# gr.Label("Image by DALL-E 3")
|
31 |
|
32 |
+
with gr.Row():
|
33 |
+
gr.Markdown(news_article)
|
34 |
|
35 |
# with gr.Row():
|
36 |
# with gr.Column():
|