VanguardAI commited on
Commit
dab87df
·
verified ·
1 Parent(s): fe1173a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -162,9 +162,13 @@ def handle_input(user_prompt, image=None, audio=None, websearch=False, document=
162
  elif function == "image_vqa":
163
  print("Executing Image Description")
164
  if image:
 
165
  image = Image.open(image).convert('RGB')
166
- messages = [{"role": "user", "content": [image, user_prompt]}]
 
 
167
  response = vqa_model.chat(image=image, msgs=messages, tokenizer=tokenizer,context=None, temperature=0.5)
 
168
  return response, None
169
  else:
170
  return "Please upload an image.", None
 
162
  elif function == "image_vqa":
163
  print("Executing Image Description")
164
  if image:
165
+ print("1")
166
  image = Image.open(image).convert('RGB')
167
+ print("2")
168
+ messages = [{"role": "user", "content": user_prompt}]
169
+ print("3")
170
  response = vqa_model.chat(image=image, msgs=messages, tokenizer=tokenizer,context=None, temperature=0.5)
171
+ print("4")
172
  return response, None
173
  else:
174
  return "Please upload an image.", None