wenhu commited on
Commit
b2067f3
·
verified ·
1 Parent(s): 58a3e3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -20
app.py CHANGED
@@ -295,26 +295,6 @@ def add_message(history, message):
295
  history = []
296
  our_chatbot = chat_manager.get_chatbot(args, model_path, tokenizer, model, image_processor, context_len)
297
  chat_image_num = 0
298
-
299
- # if len(message["files"]) <= 1:
300
- # for x in message["files"]:
301
- # history.append(((x,), None))
302
- # chat_image_num += 1
303
- # if chat_image_num > 1:
304
- # history = []
305
- # chat_manager.reset_chatbot()
306
- # our_chatbot = chat_manager.get_chatbot(args, model_path, tokenizer, model, image_processor, context_len)
307
- # chat_image_num = 0
308
- # for x in message["files"]:
309
- # history.append(((x,), None))
310
- # chat_image_num += 1
311
-
312
- # if message["text"] is not None:
313
- # history.append((message["text"], None))
314
-
315
- # print(f"### Chatbot instance ID: {id(our_chatbot)}")
316
- # return history, gr.MultimodalTextbox(value=None, interactive=False)
317
- # else:
318
  for x in message["files"]:
319
  if "realcase_video.jpg" in x:
320
  x = x.replace("realcase_video.jpg", "realcase_video.mp4")
 
295
  history = []
296
  our_chatbot = chat_manager.get_chatbot(args, model_path, tokenizer, model, image_processor, context_len)
297
  chat_image_num = 0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  for x in message["files"]:
299
  if "realcase_video.jpg" in x:
300
  x = x.replace("realcase_video.jpg", "realcase_video.mp4")