Spaces:
Runtime error
Runtime error
import gradio as gr | |
from PIL import Image | |
import hopsworks | |
project = hopsworks.login() | |
# fs = project.get_feature_store() | |
dataset_api = project.get_dataset_api() | |
dataset_api.download("Resources/images/news_image.png") | |
# dataset_api.download("Resources/images/general_sentiment_history.png") | |
# dataset_api.download("Resources/images/demo_sentiment_history.png") | |
news_headline = "Lucia celebration at KTH Library" | |
news_source = "KTH Library" | |
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. | |
We will also offer traditional Lucia fika, mainly mulled wine (alcohol free), "lussebullar" and ginger bread cookies. | |
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. | |
""" | |
with gr.Blocks() as demo: | |
gr.Markdown("# The Delight Dispatch ☀️🗞️</center>") | |
gr.Markdown("## Today's News: " + news_headline) | |
gr.Markdown("Reported by: " + news_source) | |
with gr.Row(): | |
input_img = gr.Image("news_image.png", elem_id="news-img") | |
gr.Label("Illustation by DALL-E 3") | |
with gr.Row(): | |
gr.Markdown(news_article) | |
# with gr.Row(): | |
# with gr.Column(): | |
# gr.Label("Sentiment History of News in General") | |
# input_img = gr.Image("general_sentiment_history.png", elem_id="general-history") | |
# with gr.Column(): | |
# gr.Label("Sentiment History of News on this Demo") | |
# input_img = gr.Image("demo_sentiment_history.png", elem_id="demo-history") | |
demo.launch() |