update app
Browse files- app.py +20 -4
- requirements.txt +1 -0
app.py
CHANGED
@@ -1,9 +1,25 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
return "Hello " + name + "!!"
|
6 |
|
|
|
|
|
7 |
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
from PIL import Image
|
3 |
+
import hopsworks
|
4 |
|
5 |
+
project = hopsworks.login(project="SonyaStern_Lab1")
|
6 |
+
fs = project.get_feature_store()
|
7 |
|
8 |
+
dataset_api = project.get_dataset_api()
|
|
|
9 |
|
10 |
+
dataset_api.download("Resources/images/confusion_matrix_diabetes_gan.png")
|
11 |
+
dataset_api.download("Resources/images/df_diabetes_recent.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_diabetes_recent.png", elem_id="recent-predictions")
|
18 |
+
with gr.Column():
|
19 |
+
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
20 |
+
input_img = gr.Image(
|
21 |
+
"confusion_matrix_diabetes_gan.png", elem_id="confusion-matrix"
|
22 |
+
)
|
23 |
+
|
24 |
+
print("launching the app")
|
25 |
+
demo.launch()
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
hopsworks
|