Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -79,9 +79,9 @@ def navigate(screenshot, task: str, platform: str, history):
|
|
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') == '
|
83 |
# This is a base64 string, convert it to a PIL image
|
84 |
-
item['
|
85 |
|
86 |
prompt_header = (
|
87 |
"You are a GUI agent. You are given a task and your action history, with screenshots."
|
|
|
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."
|