Stremly commited on
Commit
1c7800e
·
verified ·
1 Parent(s): c19ed0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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') == 'image' and isinstance(item.get('image'), str):
83
  # This is a base64 string, convert it to a PIL image
84
- item['image'] = load_base64_to_pil(item['image'])
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."