MCPcopy Create free account
hub / github.com/Vision-CAIR/MiniGPT-4 / example_trigger

Function example_trigger

demo_v2.py:401–408  ·  view source on GitHub ↗
(text_input, image, upload_flag, replace_flag, img_list)

Source from the content-addressed store, hash-verified

399
400
401def example_trigger(text_input, image, upload_flag, replace_flag, img_list):
402 # set the upload flag to true when receive a new image.
403 # if there is an old image (and old conversation), set the replace flag to true to reset the conv later.
404 upload_flag = 1
405 if img_list or replace_flag == 1:
406 replace_flag = 1
407
408 return upload_flag, replace_flag
409
410
411def gradio_ask(user_message, chatbot, chat_state, gr_img, img_list, upload_flag, replace_flag):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected