Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ if __name__ == "__main__":
|
|
102 |
with gr.Column():
|
103 |
input_image = gr.Image(type="pil")
|
104 |
grounding_caption = gr.Textbox(label="Detection Prompt")
|
105 |
-
run_button = gr.Button(
|
106 |
with gr.Accordion("Advanced options", open=False):
|
107 |
box_threshold = gr.Slider(
|
108 |
label="Box Threshold", minimum=0.0, maximum=1.0, value=0.25, step=0.001
|
@@ -121,13 +121,5 @@ if __name__ == "__main__":
|
|
121 |
|
122 |
run_button.click(fn=run_grounding, inputs=[
|
123 |
input_image, grounding_caption, box_threshold, text_threshold], outputs=[gallery])
|
124 |
-
gr.Examples(
|
125 |
-
[["this_is_fine.png", "coffee cup", 0.25, 0.25]],
|
126 |
-
inputs = [input_image, grounding_caption, box_threshold, text_threshold],
|
127 |
-
outputs = [gallery],
|
128 |
-
fn=run_grounding,
|
129 |
-
cache_examples=True,
|
130 |
-
label='Try this example input!'
|
131 |
-
)
|
132 |
block.launch(show_error=True)
|
133 |
|
|
|
102 |
with gr.Column():
|
103 |
input_image = gr.Image(type="pil")
|
104 |
grounding_caption = gr.Textbox(label="Detection Prompt")
|
105 |
+
run_button = gr.Button()
|
106 |
with gr.Accordion("Advanced options", open=False):
|
107 |
box_threshold = gr.Slider(
|
108 |
label="Box Threshold", minimum=0.0, maximum=1.0, value=0.25, step=0.001
|
|
|
121 |
|
122 |
run_button.click(fn=run_grounding, inputs=[
|
123 |
input_image, grounding_caption, box_threshold, text_threshold], outputs=[gallery])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
block.launch(show_error=True)
|
125 |
|