EJ-L commited on
Commit
bfae6c1
·
1 Parent(s): 19332ec
Files changed (2) hide show
  1. app.py +9 -3
  2. requirements.txt +21 -6
app.py CHANGED
@@ -151,8 +151,7 @@ css = """
151
  }
152
  """
153
 
154
- with gr.Blocks() as demo:
155
- gr.HTML(f"<style>{css}</style>")
156
  gr.Markdown("# Demo for OS-ATLAS: A Foundation Action Model For Generalist GUI Agents")
157
 
158
  with gr.Row():
@@ -170,7 +169,14 @@ with gr.Blocks() as demo:
170
  model_output_box = gr.Textbox(label="Model Output Box")
171
  annotated_image = gr.Image(label="Annotated Image")
172
 
173
- gr.Markdown("### Instructions: Upload a UI screenshot and describe what you want to find!")
 
 
 
 
 
 
 
174
 
175
  submit_btn.click(
176
  run_example,
 
151
  }
152
  """
153
 
154
+ with gr.Blocks(css=css) as demo:
 
155
  gr.Markdown("# Demo for OS-ATLAS: A Foundation Action Model For Generalist GUI Agents")
156
 
157
  with gr.Row():
 
169
  model_output_box = gr.Textbox(label="Model Output Box")
170
  annotated_image = gr.Image(label="Annotated Image")
171
 
172
+ gr.Examples(
173
+ examples=[
174
+ ["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "select search textfield"],
175
+ ["assets/web_6f93090a-81f6-489e-bb35-1a2838b18c01.png", "switch to discussions"],
176
+ ],
177
+ inputs=[input_img, text_input],
178
+ # remove fn/outputs so examples only prefill inputs
179
+ )
180
 
181
  submit_btn.click(
182
  run_example,
requirements.txt CHANGED
@@ -1,8 +1,23 @@
 
1
  numpy==1.24.4
2
- Pillow==10.3.0
3
- Requests==2.31.0
4
- torch
5
- torchvision
6
- transformers
7
  accelerate==0.30.0
8
- qwen-vl-utils
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Core deps
2
  numpy==1.24.4
3
+ pillow==10.3.0
4
+ requests==2.31.0
5
+
6
+ # HF / LLM stack
7
+ transformers>=4.44
8
  accelerate==0.30.0
9
+ qwen-vl-utils
10
+
11
+ # Gradio stack
12
+ gradio>=5,<6
13
+ gradio-client>=1.5.2,<2
14
+
15
+ # Server stack (pulled by Gradio, but pin for stability)
16
+ fastapi==0.115.*
17
+ starlette==0.40.*
18
+ uvicorn>=0.30,<1
19
+ httptools>=0.6 # optional; Uvicorn will prefer this over h11
20
+
21
+ # PyTorch (leave unpinned here; see notes below)
22
+ torch
23
+ torchvision