Spaces:
Runtime error
Runtime error
nandovallec
commited on
Commit
•
4ceb14a
1
Parent(s):
9cbc81a
Init
Browse files- .hw_api_key +1 -0
- actual_titanic.png +0 -0
- app.py +31 -0
- confusion_matrix.png +0 -0
- df_recent.png +0 -0
- latest_titanic.png +0 -0
- requirements.txt +1 -0
.hw_api_key
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Ri2FZ9IsPDNHnuly.uYd6MFsZTxbZSQ23ssaVzdzQtJNAS8fBMQ5owgIM9Wr5hUQ7Qj7Yhe7wOtPOnIDp
|
actual_titanic.png
ADDED
app.py
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/latest_titanic.png", overwrite="True")
|
11 |
+
dataset_api.download("Resources/images/actual_titanic.png", overwrite="True")
|
12 |
+
dataset_api.download("Resources/images/df_recent.png", overwrite="True")
|
13 |
+
dataset_api.download("Resources/images/confusion_matrix.png", overwrite="True")
|
14 |
+
|
15 |
+
with gr.Blocks() as demo:
|
16 |
+
with gr.Row():
|
17 |
+
with gr.Column():
|
18 |
+
gr.Label("Today's Predicted Image")
|
19 |
+
input_img = gr.Image("latest_titanic.png", elem_id="predicted-img")
|
20 |
+
with gr.Column():
|
21 |
+
gr.Label("Today's Actual Image")
|
22 |
+
input_img = gr.Image("actual_titanic.png", elem_id="actual-img")
|
23 |
+
with gr.Row():
|
24 |
+
with gr.Column():
|
25 |
+
gr.Label("Recent Prediction History")
|
26 |
+
input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
|
27 |
+
with gr.Column():
|
28 |
+
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
29 |
+
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
30 |
+
|
31 |
+
demo.launch()
|
confusion_matrix.png
ADDED
df_recent.png
ADDED
latest_titanic.png
ADDED
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
hopsworks
|