Stremly commited on
Commit
2d5d95a
·
verified ·
1 Parent(s): 74b72d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -76,12 +76,12 @@ def navigate(screenshot, task: str, platform: str, history):
76
  else:
77
  messages = history
78
 
79
- for message in messages:
80
- if message['role'] == 'user' and isinstance(message.get('content'), list):
81
- for item in message['content']:
82
- if item.get('type') == 'image_url' and isinstance(item.get('image_url'), str):
83
- # This is a base64 string, convert it to a PIL image
84
- item['image_url'] = load_base64_to_pil(item['image_url'])
85
 
86
  prompt_header = (
87
  "You are a GUI agent. You are given a task and your action history, with screenshots."
 
76
  else:
77
  messages = history
78
 
79
+ # for message in messages:
80
+ # if message['role'] == 'user' and isinstance(message.get('content'), list):
81
+ # for item in message['content']:
82
+ # if item.get('type') == 'image_url' and isinstance(item.get('image_url'), str):
83
+ # # This is a base64 string, convert it to a PIL image
84
+ # item['image_url'] = load_base64_to_pil(item['image_url'])
85
 
86
  prompt_header = (
87
  "You are a GUI agent. You are given a task and your action history, with screenshots."