Spaces:
Runtime error
Runtime error
johnbradley
commited on
Commit
β’
5c22387
1
Parent(s):
a51e566
Revert "Put details first in app"
Browse filesThis reverts commit a51e5664d6a4c4e14c3f4ced045d988c645b1d62.
app.py
CHANGED
@@ -26,7 +26,7 @@ def create_temp_file_path(prefix, suffix):
|
|
26 |
return tmpfile.name
|
27 |
|
28 |
|
29 |
-
def run_inference(
|
30 |
# input_mg: NumPy array with the shape (width, height, 3)
|
31 |
|
32 |
# Save input_mg as a temporary file
|
@@ -56,7 +56,6 @@ dm_app = gr.Interface(
|
|
56 |
fn=run_inference,
|
57 |
# Input shows markdown explaining and app and a single image upload panel
|
58 |
inputs=[
|
59 |
-
gr.Markdown(read_app_header_markdown()),
|
60 |
gr.Image()
|
61 |
],
|
62 |
# Output consists of a visualization image, a masked image, and JSON metadata
|
@@ -65,6 +64,7 @@ dm_app = gr.Interface(
|
|
65 |
gr.Image(label='mask'),
|
66 |
gr.JSON(label="JSON metadata")
|
67 |
],
|
|
|
68 |
allow_flagging="never", # Do not save user's results or prompt for users to save the results
|
69 |
examples=EXAMPLES,
|
70 |
)
|
|
|
26 |
return tmpfile.name
|
27 |
|
28 |
|
29 |
+
def run_inference(input_img):
|
30 |
# input_mg: NumPy array with the shape (width, height, 3)
|
31 |
|
32 |
# Save input_mg as a temporary file
|
|
|
56 |
fn=run_inference,
|
57 |
# Input shows markdown explaining and app and a single image upload panel
|
58 |
inputs=[
|
|
|
59 |
gr.Image()
|
60 |
],
|
61 |
# Output consists of a visualization image, a masked image, and JSON metadata
|
|
|
64 |
gr.Image(label='mask'),
|
65 |
gr.JSON(label="JSON metadata")
|
66 |
],
|
67 |
+
article=read_app_header_markdown(),
|
68 |
allow_flagging="never", # Do not save user's results or prompt for users to save the results
|
69 |
examples=EXAMPLES,
|
70 |
)
|