Spaces:
Running
on
Zero
Running
on
Zero
fix
Browse files
app.py
CHANGED
@@ -375,24 +375,19 @@ else:
|
|
375 |
input_image_component = gr.Image(type="pil", label="Input UI Image", height=400)
|
376 |
task_component = gr.Textbox(
|
377 |
label="task",
|
378 |
-
placeholder="e.g.,
|
379 |
-
info="Type the
|
380 |
)
|
381 |
-
submit_button = gr.Button("
|
382 |
|
383 |
with gr.Column(scale=1):
|
384 |
-
output_coords_component = gr.Textbox(
|
385 |
-
label="Predicted Coordinates (Format: Click(x,y))", interactive=False
|
386 |
-
)
|
387 |
-
output_image_component = gr.Image(
|
388 |
-
type="pil", label="Image with Predicted Click Point", height=400, interactive=False
|
389 |
-
)
|
390 |
|
391 |
if example_image:
|
392 |
gr.Examples(
|
393 |
examples=[[example_image, example_task]],
|
394 |
inputs=[input_image_component, task_component],
|
395 |
-
outputs=[output_coords_component
|
396 |
fn=navigate,
|
397 |
cache_examples="lazy",
|
398 |
)
|
@@ -402,7 +397,7 @@ else:
|
|
402 |
submit_button.click(
|
403 |
fn=navigate,
|
404 |
inputs=[input_image_component, task_component],
|
405 |
-
outputs=[output_coords_component
|
406 |
)
|
407 |
|
408 |
if __name__ == "__main__":
|
|
|
375 |
input_image_component = gr.Image(type="pil", label="Input UI Image", height=400)
|
376 |
task_component = gr.Textbox(
|
377 |
label="task",
|
378 |
+
placeholder="e.g., Book a hotel in Paris on August 3rd for 3 nights",
|
379 |
+
info="Type the task you want the model to complete.",
|
380 |
)
|
381 |
+
submit_button = gr.Button("Navigate", variant="primary")
|
382 |
|
383 |
with gr.Column(scale=1):
|
384 |
+
output_coords_component = gr.Textbox(label="Navigation Step", interactive=False)
|
|
|
|
|
|
|
|
|
|
|
385 |
|
386 |
if example_image:
|
387 |
gr.Examples(
|
388 |
examples=[[example_image, example_task]],
|
389 |
inputs=[input_image_component, task_component],
|
390 |
+
outputs=[output_coords_component],
|
391 |
fn=navigate,
|
392 |
cache_examples="lazy",
|
393 |
)
|
|
|
397 |
submit_button.click(
|
398 |
fn=navigate,
|
399 |
inputs=[input_image_component, task_component],
|
400 |
+
outputs=[output_coords_component],
|
401 |
)
|
402 |
|
403 |
if __name__ == "__main__":
|