Spaces:
Runtime error
Runtime error
Edward Nagy
commited on
Commit
•
9e35ede
1
Parent(s):
4f0c553
Add application file
Browse files- README.md +2 -2
- app.py +22 -0
- requirements.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
---
|
2 |
title: Wine Prediction Dashboard
|
3 |
-
emoji:
|
4 |
colorFrom: yellow
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
1 |
---
|
2 |
title: Wine Prediction Dashboard
|
3 |
+
emoji: 🍷
|
4 |
colorFrom: yellow
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 3.14.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/wine/df_recent.png")
|
11 |
+
dataset_api.download("Resources/images/wine/confusion_matrix.png")
|
12 |
+
|
13 |
+
with gr.Blocks() as demo:
|
14 |
+
with gr.Row():
|
15 |
+
with gr.Column():
|
16 |
+
gr.Label("Recent Prediction History")
|
17 |
+
input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
|
18 |
+
with gr.Column():
|
19 |
+
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
20 |
+
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
21 |
+
|
22 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
hopsworks
|