rphrp1985 commited on
Commit
99e424b
·
verified ·
1 Parent(s): f997318

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -72,9 +72,11 @@ def bot_streaming(message, history, max_new_tokens=250):
72
  images.append(img)
73
  co_mess.append({"role": x['role'], "content": [{"type": "text", "text": x['content']}, {"type": "image"}]})
74
  else:
75
- co_mess.append({"role": x['role'], "content": [{"type": "text", "text": x['content']} ]})
 
76
 
77
  except Exception as e:
 
78
  print(e)
79
  # try:
80
  # if x['content'][1]['type']=='image':
 
72
  images.append(img)
73
  co_mess.append({"role": x['role'], "content": [{"type": "text", "text": x['content']}, {"type": "image"}]})
74
  else:
75
+ raise ValueError('no imaghe')
76
+
77
 
78
  except Exception as e:
79
+ co_mess.append({"role": x['role'], "content": [{"type": "text", "text": x['content']} ]})
80
  print(e)
81
  # try:
82
  # if x['content'][1]['type']=='image':