akhaliq HF staff commited on
Commit
5975172
1 Parent(s): 6a8b740

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def chat_with_image(message, image, history):
30
  if encoded_image:
31
  messages.append({
32
  "role": "user",
33
- "content": f"[IMAGE]{encoded_image}[/IMAGE]\nWhat's in this image?"
34
  })
35
  else:
36
  messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
@@ -45,7 +45,7 @@ def chat_with_image(message, image, history):
45
  if encoded_image:
46
  messages.append({
47
  "role": "user",
48
- "content": f"[IMAGE]{encoded_image}[/IMAGE]\n{message or \"What's in this image?\"}"
49
  })
50
  else:
51
  messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
 
30
  if encoded_image:
31
  messages.append({
32
  "role": "user",
33
+ "content": f"[IMAGE]{encoded_image}[/IMAGE]\nWhat is in this image?"
34
  })
35
  else:
36
  messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})
 
45
  if encoded_image:
46
  messages.append({
47
  "role": "user",
48
+ "content": f"[IMAGE]{encoded_image}[/IMAGE]\n{message or 'What is in this image?'}"
49
  })
50
  else:
51
  messages.append({"role": "user", "content": "I tried to upload an image, but there was an error."})