paralym commited on
Commit
9e47a09
1 Parent(s): b4057de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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