aarbelle commited on
Commit
9f8d6c9
·
verified ·
1 Parent(s): 9dc5c64

Update app.py

Browse files

The image token for granite vision is `<image>` not `[Image]`

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def get_text_from_content(content):
14
  if item["type"] == "text":
15
  texts.append(item["text"])
16
  elif item["type"] == "image":
17
- texts.append("[Image]")
18
  return " ".join(texts)
19
 
20
  @spaces.GPU
 
14
  if item["type"] == "text":
15
  texts.append(item["text"])
16
  elif item["type"] == "image":
17
+ texts.append("<image>")
18
  return " ".join(texts)
19
 
20
  @spaces.GPU