Spaces:
Runtime error
Runtime error
Commit
·
b2bf049
1
Parent(s):
a1d5893
test
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from PIL import Image
|
3 |
import hopsworks
|
4 |
|
5 |
-
|
6 |
SYNTHETIC = False
|
7 |
|
8 |
latestSurvivorImage = 'latest_survivor_pred.png'
|
@@ -19,9 +19,11 @@ if SYNTHETIC:
|
|
19 |
confusionMatrix += '_synthetic'
|
20 |
|
21 |
with gr.Blocks() as demo:
|
|
|
22 |
project = hopsworks.login()
|
23 |
fs = project.get_feature_store()
|
24 |
|
|
|
25 |
dataset_api = project.get_dataset_api()
|
26 |
|
27 |
print('Downloading...')
|
@@ -33,6 +35,7 @@ with gr.Blocks() as demo:
|
|
33 |
dataset_api.download(f"Resources/images/{recentHistory}")
|
34 |
dataset_api.download(f"Resources/images/{confusionMatrix}")
|
35 |
|
|
|
36 |
with gr.Column():
|
37 |
gr.Label("Today's passenger")
|
38 |
input_img = gr.Image(f"{latestSurvivorImage}",
|
|
|
2 |
from PIL import Image
|
3 |
import hopsworks
|
4 |
|
5 |
+
# If You want to inspect the results for the synthetic data set SYNTHETIC = TRUE
|
6 |
SYNTHETIC = False
|
7 |
|
8 |
latestSurvivorImage = 'latest_survivor_pred.png'
|
|
|
19 |
confusionMatrix += '_synthetic'
|
20 |
|
21 |
with gr.Blocks() as demo:
|
22 |
+
# Login to hopsworks
|
23 |
project = hopsworks.login()
|
24 |
fs = project.get_feature_store()
|
25 |
|
26 |
+
# Download all the necessary files
|
27 |
dataset_api = project.get_dataset_api()
|
28 |
|
29 |
print('Downloading...')
|
|
|
35 |
dataset_api.download(f"Resources/images/{recentHistory}")
|
36 |
dataset_api.download(f"Resources/images/{confusionMatrix}")
|
37 |
|
38 |
+
# Arrange the images
|
39 |
with gr.Column():
|
40 |
gr.Label("Today's passenger")
|
41 |
input_img = gr.Image(f"{latestSurvivorImage}",
|