Update app.py
Browse files
app.py
CHANGED
@@ -109,31 +109,30 @@ css = """
|
|
109 |
with gr.Blocks(css=css) as demo:
|
110 |
gr.Markdown(
|
111 |
"""
|
112 |
-
# OS-
|
113 |
""")
|
114 |
-
with gr.
|
115 |
-
with gr.
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
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)
|