plcedoz38 commited on
Commit
a474e05
·
1 Parent(s): e70b669
Files changed (1) hide show
  1. app.py +6 -11
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., Click the 'Login' button",
379
- info="Type the action you want the model to localize on the image.",
380
  )
381
- submit_button = gr.Button("Localize Click", variant="primary")
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, output_image_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, output_image_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__":