Vision-CAIR commited on
Commit
fd5096e
β€’
1 Parent(s): d771171

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -440,7 +440,7 @@ def gradio_ask(user_message, chatbot, chat_state, gr_img, img_list, upload_flag,
440
  replace_flag = 0
441
  chatbot = []
442
  img_list = []
443
- llm_message, img_list = chat.upload_img(gr_img, chat_state, img_list)
444
  upload_flag = 0
445
 
446
  chat.ask(user_message, chat_state)
@@ -470,7 +470,7 @@ def gradio_answer(chatbot, chat_state, img_list, temperature):
470
  def gradio_stream_answer(chatbot, chat_state, img_list, temperature):
471
  if len(img_list) > 0:
472
  if not isinstance(img_list[0], torch.Tensor):
473
- img_list = chat.encode_img(img_list)
474
  streamer = chat.stream_answer(conv=chat_state,
475
  img_list=img_list,
476
  temperature=temperature,
 
440
  replace_flag = 0
441
  chatbot = []
442
  img_list = []
443
+ llm_message = chat.upload_img(gr_img, chat_state, img_list)
444
  upload_flag = 0
445
 
446
  chat.ask(user_message, chat_state)
 
470
  def gradio_stream_answer(chatbot, chat_state, img_list, temperature):
471
  if len(img_list) > 0:
472
  if not isinstance(img_list[0], torch.Tensor):
473
+ chat.encode_img(img_list)
474
  streamer = chat.stream_answer(conv=chat_state,
475
  img_list=img_list,
476
  temperature=temperature,