KingNish commited on
Commit
afff019
1 Parent(s): d9766c7

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +1 -4
chatbot.py CHANGED
@@ -243,10 +243,7 @@ def model_inference( user_prompt, chat_history, web_search):
243
  output += response.token.text
244
  yield output
245
  else:
246
- if len(message.files) == 1:
247
- image = [message.files[0].path]
248
- elif len(message.files) > 1:
249
- image = [msg.path for msg in message.files]
250
 
251
  txt = user_prompt["text"]
252
  img = user_prompt["files"]
 
243
  output += response.token.text
244
  yield output
245
  else:
246
+ image = user_prompt["files"][-1]
 
 
 
247
 
248
  txt = user_prompt["text"]
249
  img = user_prompt["files"]