Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,13 @@ with gr.Blocks() as demo:
|
|
18 |
item_id = gr.Textbox(label="Item ID")
|
19 |
threshold = gr.Number(label="Threshold", value=0.5)
|
20 |
submit = gr.Button("Submit")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
gr.Examples(
|
22 |
examples=[["MLU449951849", 0.3], ["MLA1293465558", 0.3], ["MLB3184663685", 0.3], ["MLC1392230619", 0.3]],
|
23 |
inputs=[item_id, threshold],
|
@@ -25,10 +32,5 @@ with gr.Blocks() as demo:
|
|
25 |
fn=validate,
|
26 |
cache_examples=True,
|
27 |
)
|
28 |
-
domain = gr.Markdown()
|
29 |
-
valid = gr.Gallery(label="Valid images").style(grid=[1, 2, 3], height="auto")
|
30 |
-
invalid = gr.Gallery(label="Invalid images").style(grid=[1, 2, 3], height="auto")
|
31 |
-
submit.click(inputs=[item_id, threshold], outputs=[domain, valid, invalid], fn=validate)
|
32 |
-
|
33 |
|
34 |
demo.launch()
|
|
|
18 |
item_id = gr.Textbox(label="Item ID")
|
19 |
threshold = gr.Number(label="Threshold", value=0.5)
|
20 |
submit = gr.Button("Submit")
|
21 |
+
gr.HTML("<hr>")
|
22 |
+
domain = gr.Markdown()
|
23 |
+
valid = gr.Gallery(label="Valid images").style(grid=[1, 2, 3], height="auto")
|
24 |
+
gr.HTML("<hr>")
|
25 |
+
invalid = gr.Gallery(label="Invalid images").style(grid=[1, 2, 3], height="auto")
|
26 |
+
submit.click(inputs=[item_id, threshold], outputs=[domain, valid, invalid], fn=validate)
|
27 |
+
gr.HTML("<hr>")
|
28 |
gr.Examples(
|
29 |
examples=[["MLU449951849", 0.3], ["MLA1293465558", 0.3], ["MLB3184663685", 0.3], ["MLC1392230619", 0.3]],
|
30 |
inputs=[item_id, threshold],
|
|
|
32 |
fn=validate,
|
33 |
cache_examples=True,
|
34 |
)
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
demo.launch()
|