Ludvig Doeser commited on
Commit
d5dc804
1 Parent(s): c12debc

Add application and requirement

Browse files
Files changed (2) hide show
  1. app.py +27 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/df_latest_news.png",overwrite=True)
11
+ dataset_api.download("Resources/images/df_recent_tsla_predictions.png",overwrite=True)
12
+ dataset_api.download("Resources/images/stock_price_w_pred.png",overwrite=True)
13
+
14
+ with gr.Blocks() as demo:
15
+ with gr.Row():
16
+ with gr.Column():
17
+ gr.Label("Recent Predictions")
18
+ input_img = gr.Image("df_recent_tsla_predictions.png", elem_id="predicted-img")
19
+ with gr.Column():
20
+ gr.Label("Recent Stock Prices")
21
+ input_img = gr.Image("stock_price_w_pred.png", elem_id="actual-img")
22
+ with gr.Row():
23
+ with gr.Column():
24
+ gr.Label("Latest News Articles")
25
+ input_img = gr.Image("df_latest_news.png", elem_id="actual-img")
26
+
27
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ hopsworks