maxiw commited on
Commit
398c325
1 Parent(s): 13a0d78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -25
app.py CHANGED
@@ -109,31 +109,30 @@ css = """
109
  with gr.Blocks(css=css) as demo:
110
  gr.Markdown(
111
  """
112
- # OS-Atlas Demo
113
  """)
114
- with gr.Tab(label="OS-Atlas Input"):
115
- with gr.Row():
116
- with gr.Column():
117
- input_img = gr.Image(label="Input Image", type="pil")
118
- model_selector = gr.Dropdown(choices=list(models.keys()), label="Model", value="OS-Copilot/OS-Atlas-Base-7B")
119
- text_input = gr.Textbox(label="User Prompt")
120
- submit_btn = gr.Button(value="Submit")
121
- with gr.Column():
122
- model_output_text = gr.Textbox(label="Model Output Text")
123
- annotated_image = gr.Image(label="Annotated Image")
124
-
125
- gr.Examples(
126
- examples=[
127
- ["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "select search textfield"],
128
- ["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "switch to discussions"],
129
- ],
130
- inputs=[input_img, text_input],
131
- outputs=[model_output_text, annotated_image],
132
- fn=run_example,
133
- cache_examples=True,
134
- label="Try examples"
135
- )
136
-
137
- submit_btn.click(run_example, [input_img, text_input, model_selector], [model_output_text, annotated_image])
138
 
139
  demo.launch(debug=True)
 
109
  with gr.Blocks(css=css) as demo:
110
  gr.Markdown(
111
  """
112
+ # Demo for OS-ATLAS: A Foundation Action Model For Generalist GUI Agents
113
  """)
114
+ with gr.Row():
115
+ with gr.Column():
116
+ input_img = gr.Image(label="Input Image", type="pil")
117
+ model_selector = gr.Dropdown(choices=list(models.keys()), label="Model", value="OS-Copilot/OS-Atlas-Base-7B")
118
+ text_input = gr.Textbox(label="User Prompt")
119
+ submit_btn = gr.Button(value="Submit")
120
+ with gr.Column():
121
+ model_output_text = gr.Textbox(label="Model Output Text")
122
+ annotated_image = gr.Image(label="Annotated Image")
123
+
124
+ gr.Examples(
125
+ examples=[
126
+ ["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "select search textfield"],
127
+ ["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "switch to discussions"],
128
+ ],
129
+ inputs=[input_img, text_input],
130
+ outputs=[model_output_text, annotated_image],
131
+ fn=run_example,
132
+ cache_examples=True,
133
+ label="Try examples"
134
+ )
135
+
136
+ submit_btn.click(run_example, [input_img, text_input, model_selector], [model_output_text, annotated_image])
 
137
 
138
  demo.launch(debug=True)