paralym commited on
Commit
5aebb63
·
verified ·
1 Parent(s): 2c68e35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -253,8 +253,10 @@ def add_message(history, message):
253
  global chat_image_num
254
  if not history:
255
  history = []
 
256
  our_chatbot = chat_manager.get_chatbot(args, model_path, tokenizer, model, image_processor, context_len)
257
  chat_image_num = 0
 
258
 
259
  if len(message["files"]) <= 1:
260
  for x in message["files"]:
@@ -271,7 +273,7 @@ def add_message(history, message):
271
 
272
  if message["text"] is not None:
273
  history.append((message["text"], None))
274
-
275
  print(f"### Chatbot instance ID: {id(our_chatbot)}")
276
  return history, gr.MultimodalTextbox(value=None, interactive=False)
277
  else:
 
253
  global chat_image_num
254
  if not history:
255
  history = []
256
+ print("### Initialize chatbot")
257
  our_chatbot = chat_manager.get_chatbot(args, model_path, tokenizer, model, image_processor, context_len)
258
  chat_image_num = 0
259
+ print("chat_image_num", chat_image_num)
260
 
261
  if len(message["files"]) <= 1:
262
  for x in message["files"]:
 
273
 
274
  if message["text"] is not None:
275
  history.append((message["text"], None))
276
+ print("chat_image_num", chat_image_num)
277
  print(f"### Chatbot instance ID: {id(our_chatbot)}")
278
  return history, gr.MultimodalTextbox(value=None, interactive=False)
279
  else: