Spaces:
Runtime error
Runtime error
Upload 3 files
Browse files- README.md +5 -4
- app.py +30 -0
- requirements.txt +1 -0
README.md
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
---
|
2 |
title: Titanic Monitoring
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: gradio
|
7 |
-
sdk_version: 3.
|
8 |
app_file: app.py
|
9 |
pinned: false
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
title: Titanic Monitoring
|
3 |
+
emoji: 💻
|
4 |
+
colorFrom: purple
|
5 |
+
colorTo: yellow
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.8.2
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
+
license: apache-2.0
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import hopsworks
|
3 |
+
|
4 |
+
project = hopsworks.login()
|
5 |
+
fs = project.get_feature_store()
|
6 |
+
|
7 |
+
dataset_api = project.get_dataset_api()
|
8 |
+
|
9 |
+
dataset_api.download("Resources/images/latest_titanic.png", overwrite=True)
|
10 |
+
dataset_api.download("Resources/images/actual_titanic.png", overwrite=True)
|
11 |
+
dataset_api.download("Resources/images/df_titanic_recent.png", overwrite=True) # naming!
|
12 |
+
dataset_api.download("Resources/images/titanic_confusion_matrix.png", overwrite=True) # naming!
|
13 |
+
|
14 |
+
with gr.Blocks() as demo:
|
15 |
+
with gr.Row():
|
16 |
+
with gr.Column():
|
17 |
+
gr.Label("Today's Predicted Titanic Survival")
|
18 |
+
input_img = gr.Image("latest_titanic.png", elem_id="predicted-img")
|
19 |
+
with gr.Column():
|
20 |
+
gr.Label("Today's Actual Titanic Survival")
|
21 |
+
input_img = gr.Image("actual_titanic.png", elem_id="actual-img")
|
22 |
+
with gr.Row():
|
23 |
+
with gr.Column():
|
24 |
+
gr.Label("Recent Prediction History")
|
25 |
+
input_img = gr.Image("df_titanic_recent.png", elem_id="recent-predictions")
|
26 |
+
with gr.Column():
|
27 |
+
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
28 |
+
input_img = gr.Image("titanic_confusion_matrix.png", elem_id="confusion-matrix")
|
29 |
+
|
30 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
hopsworks
|