Neprox commited on
Commit
79cbdef
·
1 Parent(s): d0b84af
Files changed (1) hide show
  1. app.py +33 -0
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # TODO
11
+ dataset_api.download("Resources/images/latest_passenger.png")
12
+ dataset_api.download("Resources/images/actual_passenger.png")
13
+ dataset_api.download("Resources/images/df_recent.png")
14
+ dataset_api.download("Resources/images/confusion_matrix.png")
15
+
16
+ # TODO
17
+ with gr.Blocks() as demo:
18
+ with gr.Row():
19
+ with gr.Column():
20
+ gr.Label("Today's Predicted Passenger")
21
+ input_img = gr.Image("latest_passenger.png", elem_id="predicted-img")
22
+ with gr.Column():
23
+ gr.Label("Today's Actual Passenger")
24
+ input_img = gr.Image("actual_passenger.png", elem_id="actual-img")
25
+ with gr.Row():
26
+ with gr.Column():
27
+ gr.Label("Recent Prediction History")
28
+ input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
29
+ with gr.Column():
30
+ gr.Label("Confusion Maxtrix with Historical Prediction Performance")
31
+ input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
32
+
33
+ demo.launch()