filip_praca commited on
Commit
5780d7c
1 Parent(s): 0ffba29
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from PIL import Image
3
+ import hopsworks
4
+ import os
5
+
6
+ project = hopsworks.login(api_key_value=os.environ['UNI_HOPSWORKS_API_KEY'])
7
+
8
+ fs = project.get_feature_store()
9
+
10
+ dataset_api = project.get_dataset_api()
11
+
12
+ dataset_api.download("Resources/images/df_recent.png")
13
+ dataset_api.download("Resources/images/confusion_matrix.png")
14
+
15
+ with gr.Blocks() as demo:
16
+ with gr.Row():
17
+ with gr.Column():
18
+ gr.Label("Recent Prediction History")
19
+ input_img = gr.components.Image("df_recent.png", elem_id="recent-predictions")
20
+ with gr.Column():
21
+ gr.Label("Confusion Maxtrix with Historical Prediction Performance")
22
+ input_img = gr.components.Image("confusion_matrix.png", elem_id="confusion-matrix")
23
+
24
+ demo.launch()