Spaces:
Sleeping
Sleeping
Commit
·
2132c1c
1
Parent(s):
fa82754
Upload 2 files
Browse files- app.py +47 -0
- requirements.txt +3 -0
app.py
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_wine_red.png")
|
11 |
+
dataset_api.download("Resources/images/actual_wine_red.png")
|
12 |
+
dataset_api.download("Resources/images/df_recent_wine_red.png")
|
13 |
+
dataset_api.download("Resources/images/confusion_matrix_wine_red.png")
|
14 |
+
dataset_api.download("Resources/images/latest_wine_white.png")
|
15 |
+
dataset_api.download("Resources/images/actual_wine_white.png")
|
16 |
+
dataset_api.download("Resources/images/df_recent_wine_white.png")
|
17 |
+
dataset_api.download("Resources/images/confusion_matrix_wine_white.png")
|
18 |
+
|
19 |
+
with gr.Blocks() as demo:
|
20 |
+
with gr.Row():
|
21 |
+
with gr.Column():
|
22 |
+
gr.Label("Today's Red Predicted Quality")
|
23 |
+
input_img = gr.Image("latest_wine_red.png", elem_id="predicted-img-red")
|
24 |
+
with gr.Column():
|
25 |
+
gr.Label("Today's Red Actual Quality")
|
26 |
+
input_img = gr.Image("actual_wine_red.png", elem_id="actual-img-red")
|
27 |
+
with gr.Column():
|
28 |
+
gr.Label("Today's White Actual Quality")
|
29 |
+
input_img = gr.Image("actual_wine_white.png", elem_id="actual-img-white")
|
30 |
+
with gr.Column():
|
31 |
+
gr.Label("Today's White Actual Quality")
|
32 |
+
input_img = gr.Image("actual_wine_white.png", elem_id="actual-img-white")
|
33 |
+
with gr.Row():
|
34 |
+
with gr.Column():
|
35 |
+
gr.Label("Recent Red Prediction History")
|
36 |
+
input_img = gr.Image("df_recent_wine_red.png", elem_id="recent-predictions-red")
|
37 |
+
with gr.Column():
|
38 |
+
gr.Label("Confusion Maxtrix with Historical Red Prediction Performance")
|
39 |
+
input_img = gr.Image("confusion_matri_wine_red.png", elem_id="confusion-matrix-red")
|
40 |
+
with gr.Column():
|
41 |
+
gr.Label("Recent White Prediction History")
|
42 |
+
input_img = gr.Image("df_recent_wine_white.png", elem_id="recent-predictions-white")
|
43 |
+
with gr.Column():
|
44 |
+
gr.Label("Confusion Maxtrix with Historical White Prediction Performance")
|
45 |
+
input_img = gr.Image("confusion_matri_wine_white.png", elem_id="confusion-matrix-white")
|
46 |
+
|
47 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
hopsworks
|
2 |
+
joblib
|
3 |
+
scikit-learn==1.1.3
|