Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1 +1,31 @@
|
|
1 |
-
import gradio as gr
|
2 |
with gr.Row():
|
3 |
with gr.Column():
|
4 |
gr.Label("Today's Predicted Image")
|
5 |
input_img = gr.Image("latest_iris.png", elem_id="predicted-img")
|
6 |
with gr.Column():
|
7 |
gr.Label("Today's Actual Image")
|
8 |
input_img = gr.Image("actual_iris.png", elem_id="actual-img")
|
9 |
with gr.Row():
|
10 |
with gr.Column():
|
11 |
gr.Label("Recent Prediction History")
|
12 |
input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
|
13 |
with gr.Column():
|
14 |
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
15 |
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
with gr.Row():
|
2 |
with gr.Column():
|
3 |
gr.Label("Today's Predicted Image")
|
4 |
input_img = gr.Image("latest_iris.png", elem_id="predicted-img")
|
5 |
with gr.Column():
|
6 |
gr.Label("Today's Actual Image")
|
7 |
input_img = gr.Image("actual_iris.png", elem_id="actual-img")
|
8 |
with gr.Row():
|
9 |
with gr.Column():
|
10 |
gr.Label("Recent Prediction History")
|
11 |
input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
|
12 |
with gr.Column():
|
13 |
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
14 |
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
15 |
+
import gradio as gr
|
16 |
+
from PIL import Image
|
17 |
+
import hopsworks
|
18 |
+
|
19 |
+
project = hopsworks.login()
|
20 |
+
fs = project.get_feature_store()
|
21 |
+
|
22 |
+
dataset_api = project.get_dataset_api()
|
23 |
+
|
24 |
+
dataset_api.download("Resources/images/latest_iris.png", overwrite=True)
|
25 |
+
dataset_api.download("Resources/images/actual_iris.png", overwrite=True)
|
26 |
+
dataset_api.download("Resources/images/df_recent.png", overwrite=True)
|
27 |
+
dataset_api.download("Resources/images/confusion_matrix.png", overwrite=True)
|
28 |
+
|
29 |
+
with gr.Blocks() as demo:
|
30 |
+
with gr.Row():
|
31 |
+
with gr.Column():
|
32 |
+
gr.Label("Today's Predicted Image")
|
33 |
+
input_img = gr.Image("latest_iris.png", elem_id="predicted-img")
|
34 |
+
with gr.Column():
|
35 |
+
gr.Label("Today's Actual Image")
|
36 |
+
input_img = gr.Image("actual_iris.png", elem_id="actual-img")
|
37 |
+
with gr.Row():
|
38 |
+
with gr.Column():
|
39 |
+
gr.Label("Recent Prediction History")
|
40 |
+
input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
|
41 |
+
with gr.Column():
|
42 |
+
gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
43 |
+
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
44 |
+
|
45 |
+
demo.launch()
|