Jim Dowling
commited on
Commit
·
a9ff082
1
Parent(s):
7fdfa4a
update
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ def greet(name):
|
|
7 |
|
8 |
|
9 |
name="prophet"
|
|
|
10 |
project = hopsworks.login()
|
11 |
|
12 |
# Get the dataset API for the current project
|
@@ -17,7 +18,7 @@ mr = project.get_model_registry()
|
|
17 |
#get the version number for the latest model
|
18 |
version = mr.get_models(name)[-1].version
|
19 |
# Specify the local file path of the Python script to be uploaded
|
20 |
-
img_path = f"Models/{name}/{version}/images/
|
21 |
|
22 |
# Upload the Python script to the "Models", and overwrite if it already exists
|
23 |
downloaded_file_path = dataset_api.download(img_path, overwrite=True)
|
@@ -26,13 +27,13 @@ downloaded_file_path = dataset_api.download(img_path, overwrite=True)
|
|
26 |
|
27 |
|
28 |
def show_image(dummy):
|
29 |
-
image = Image.open("
|
30 |
return image
|
31 |
|
32 |
# Define the Gradio interface
|
33 |
iface = gr.Interface(
|
34 |
fn=show_image,
|
35 |
-
inputs="text",
|
36 |
outputs="image",
|
37 |
title="Display PNG Image",
|
38 |
)
|
|
|
7 |
|
8 |
|
9 |
name="prophet"
|
10 |
+
img="fig2.png"
|
11 |
project = hopsworks.login()
|
12 |
|
13 |
# Get the dataset API for the current project
|
|
|
18 |
#get the version number for the latest model
|
19 |
version = mr.get_models(name)[-1].version
|
20 |
# Specify the local file path of the Python script to be uploaded
|
21 |
+
img_path = f"Models/{name}/{version}/images/{img}"
|
22 |
|
23 |
# Upload the Python script to the "Models", and overwrite if it already exists
|
24 |
downloaded_file_path = dataset_api.download(img_path, overwrite=True)
|
|
|
27 |
|
28 |
|
29 |
def show_image(dummy):
|
30 |
+
image = Image.open(f"{img}")
|
31 |
return image
|
32 |
|
33 |
# Define the Gradio interface
|
34 |
iface = gr.Interface(
|
35 |
fn=show_image,
|
36 |
+
#inputs="text",
|
37 |
outputs="image",
|
38 |
title="Display PNG Image",
|
39 |
)
|