Spaces:
Runtime error
Runtime error
Commit
·
baa2d87
1
Parent(s):
c902056
Update app.py
Browse files
app.py
CHANGED
@@ -1,36 +1,3 @@
|
|
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_passenger.png")
|
11 |
-
# dataset_api.download("Resources/images/actual_passenger.png")
|
12 |
-
# dataset_api.download("Resources/images/df_recent.png")
|
13 |
-
# dataset_api.download("Resources/images/confusion_matrix.png")
|
14 |
-
|
15 |
-
# with gr.Blocks() as demo:
|
16 |
-
# with gr.Row():
|
17 |
-
# with gr.Column():
|
18 |
-
# gr.Label("Today's Predicted Passenger")
|
19 |
-
# input_img = gr.Image("latest_passenger.png", elem_id="predicted-img")
|
20 |
-
# with gr.Column():
|
21 |
-
# gr.Label("Today's Actual Passenger")
|
22 |
-
# input_img = gr.Image("actual_passenger.png", elem_id="actual-img")
|
23 |
-
# with gr.Row():
|
24 |
-
# with gr.Column():
|
25 |
-
# gr.Label("Recent Prediction History")
|
26 |
-
# input_img = gr.Image("df_recent.png", elem_id="recent-predictions")
|
27 |
-
# with gr.Column():
|
28 |
-
# gr.Label("Confusion Maxtrix with Historical Prediction Performance")
|
29 |
-
# input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
30 |
-
|
31 |
-
#demo.launch()
|
32 |
-
|
33 |
-
|
34 |
import gradio as gr
|
35 |
from PIL import Image
|
36 |
import hopsworks
|
@@ -40,19 +7,19 @@ fs = project.get_feature_store()
|
|
40 |
|
41 |
dataset_api = project.get_dataset_api()
|
42 |
|
43 |
-
dataset_api.download("Resources/images/
|
44 |
-
dataset_api.download("Resources/images/
|
45 |
dataset_api.download("Resources/images/df_recent.png")
|
46 |
dataset_api.download("Resources/images/confusion_matrix.png")
|
47 |
|
48 |
with gr.Blocks() as demo:
|
49 |
with gr.Row():
|
50 |
with gr.Column():
|
51 |
-
gr.Label("Today's Predicted
|
52 |
-
input_img = gr.Image("
|
53 |
with gr.Column():
|
54 |
-
gr.Label("Today's Actual
|
55 |
-
input_img = gr.Image("
|
56 |
with gr.Row():
|
57 |
with gr.Column():
|
58 |
gr.Label("Recent Prediction History")
|
@@ -62,3 +29,4 @@ with gr.Blocks() as demo:
|
|
62 |
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
63 |
|
64 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
import hopsworks
|
|
|
7 |
|
8 |
dataset_api = project.get_dataset_api()
|
9 |
|
10 |
+
dataset_api.download("Resources/images/latest_passenger.png")
|
11 |
+
dataset_api.download("Resources/images/actual_passenger.png")
|
12 |
dataset_api.download("Resources/images/df_recent.png")
|
13 |
dataset_api.download("Resources/images/confusion_matrix.png")
|
14 |
|
15 |
with gr.Blocks() as demo:
|
16 |
with gr.Row():
|
17 |
with gr.Column():
|
18 |
+
gr.Label("Today's Predicted Passenger")
|
19 |
+
input_img = gr.Image("latest_passenger.png", elem_id="predicted-img")
|
20 |
with gr.Column():
|
21 |
+
gr.Label("Today's Actual Passenger")
|
22 |
+
input_img = gr.Image("actual_passenger.png", elem_id="actual-img")
|
23 |
with gr.Row():
|
24 |
with gr.Column():
|
25 |
gr.Label("Recent Prediction History")
|
|
|
29 |
input_img = gr.Image("confusion_matrix.png", elem_id="confusion-matrix")
|
30 |
|
31 |
demo.launch()
|
32 |
+
|