marc-thibault-h commited on
Commit
9e18110
·
verified ·
1 Parent(s): 0b25e45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -96,10 +96,6 @@ def get_localization_prompt(component, image, step=1):
96
  - image: The current screenshot of the web page
97
  - step: The current step of the task
98
  """
99
- system_prompt = SYSTEM_PROMPT.format(
100
- output_format=NavigationStep.model_json_schema(),
101
- timestamp="2025-06-04 14:16:03",
102
- )
103
  return [
104
  {
105
  "role": "user",
@@ -234,15 +230,15 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
234
  with gr.Column():
235
  output_coords_component = gr.Textbox(label="Localization Step")
236
 
237
- submit_button.click(navigate, [input_image_component, task_component], [output_coords_component])
238
 
239
  gr.Examples(
240
  examples=[[example_image, example_task]],
241
  inputs=[input_image_component, task_component],
242
  outputs=[output_coords_component],
243
- fn=navigate,
244
  cache_examples="lazy",
245
  )
246
 
247
  demo.queue(api_open=False)
248
- demo.launch(debug=True)
 
96
  - image: The current screenshot of the web page
97
  - step: The current step of the task
98
  """
 
 
 
 
99
  return [
100
  {
101
  "role": "user",
 
230
  with gr.Column():
231
  output_coords_component = gr.Textbox(label="Localization Step")
232
 
233
+ submit_button.click(localize, [input_image_component, task_component], [output_coords_component])
234
 
235
  gr.Examples(
236
  examples=[[example_image, example_task]],
237
  inputs=[input_image_component, task_component],
238
  outputs=[output_coords_component],
239
+ fn=localize,
240
  cache_examples="lazy",
241
  )
242
 
243
  demo.queue(api_open=False)
244
+ demo.launch(debug=True)