paralym commited on
Commit
e9390c8
·
verified ·
1 Parent(s): 58ea498

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -242,8 +242,12 @@ def add_message(history, message):
242
  args, model_path, tokenizer, model, image_processor, context_len
243
  )
244
 
245
- for x in message["files"]:
246
- history.append(((x,), None))
 
 
 
 
247
  if message["text"] is not None:
248
  history.append((message["text"], None))
249
 
 
242
  args, model_path, tokenizer, model, image_processor, context_len
243
  )
244
 
245
+ if len(message["files"]) <= 1:
246
+ for x in message["files"]:
247
+ history.append(((x,), None))
248
+ elif len(message["files"]) > 1:
249
+ history.append((tuple(message["files"]), None))
250
+
251
  if message["text"] is not None:
252
  history.append((message["text"], None))
253