Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
246 |
-
|
|
|
|
|
|
|
|
|
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 |
|