Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -235,6 +235,8 @@ def add_message(history, message):
|
|
| 235 |
# history=[]
|
| 236 |
global our_chatbot
|
| 237 |
global chat_image_num
|
|
|
|
|
|
|
| 238 |
if len(history) == 0:
|
| 239 |
our_chatbot = InferenceDemo(
|
| 240 |
args, model_path, tokenizer, model, image_processor, context_len
|
|
|
|
| 235 |
# history=[]
|
| 236 |
global our_chatbot
|
| 237 |
global chat_image_num
|
| 238 |
+
if not history:
|
| 239 |
+
history = []
|
| 240 |
if len(history) == 0:
|
| 241 |
our_chatbot = InferenceDemo(
|
| 242 |
args, model_path, tokenizer, model, image_processor, context_len
|