Spaces:
Runtime error
Runtime error
Update app.py
Browse files209 unmodified lines21021121221321421521621734 unmodified lines2522532542552562572582592605 unmodified lines266267268269270271272273274275276277209 unmodified linesprompt = get_navigation_prompt(task, input_pil_image)print("Prompt:")print(prompt)if model is None:raise ValueError("Model not loaded")34 unmodified linesgr.Markdown(f"<h1 style='text-align: center;'>{title}</h1>")# gr.Markdown(description)with gr.Row():with gr.Column():input_image_component = gr.Image(label="Input UI Image", height=400)task_component = gr.Textbox(label="task",placeholder="e.g., Search for the name of the current UK Prime Minister.",5 unmodified lineslocalization_image_component = gr.Image(label="Action Localization", height=400)output_coords_component = gr.Textbox(label="Agent Output", lines=10)submit_button.click(navigate, [input_image_component, task_component], [output_coords_component, localization_image_component])gr.Examples(examples=[[example_1_image, example_1_task], [example_2_image, example_2_task]],inputs=[input_image_component, task_component],outputs=[output_coords_component, localization_image_component],fn=navigate,cache_examples=True,)209 unmodified lines21021121221321421534 unmodified lines2502512522532542552562572582595 unmodified lines265266267268269270271272273274275276209 unmodified linesprompt = get_navigation_prompt(task, input_pil_image)if model is None:raise ValueError("Model not loaded")34 unmodified linesgr.Markdown(f"<h1 style='text-align: center;'>{title}</h1>")# gr.Markdown(description)with gr.Row():input_image_component = gr.Image(label="UI Image", height=500)with gr.Row():with gr.Column():task_component = gr.Textbox(label="task",placeholder="e.g., Search for the name of the current UK Prime Minister.",5 unmodified lineslocalization_image_component = gr.Image(label="Action Localization", height=400)output_coords_component = gr.Textbox(label="Agent Output", lines=10)submit_button.click(navigate, [input_image_component, task_component], [output_coords_component, input_image_component])gr.Examples(examples=[[example_1_image, example_1_task], [example_2_image, example_2_task]],inputs=[input_image_component, task_component],outputs=[output_coords_component, input_image_component],fn=navigate,cache_examples=True,)
app.py+4-5