LouisLi commited on
Commit
c0991ab
·
verified ·
1 Parent(s): 29b4d56

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -941,14 +941,14 @@ def update_click_state(click_state, caption, click_mode):
941
  raise NotImplementedError
942
 
943
  async def chat_input_callback(*args):
944
- visual_chatgpt, chat_input, click_state, state, aux_state ,language ,length, autoplay,gender,api_key,image_input,log_state,history,persona = args
945
  message = chat_input["text"]
946
  if persona == "Narrator":
947
- prompt="Please help me answer the question with this painting {question} in {language}, with a response length of about {length} words.."
948
  elif persona =="Artist":
949
- prompt="When generating the answer, you should tell others that you are one of the creators of these paintings and generate the text in the tone and manner as if you are the creator of the painting. Please help me answer the question with this painting {question} in {language}, with a response length of about {length} words."
950
  else:
951
- prompt="When generating answers, you should tell people that you are the object itself that was selected, and generate text in the tone and manner in which you are the object or the person. Please help me answer the question with this painting {question} in {language}, with a response length of about {length} words."
952
  prompt=prompt.format(question=message, language=language)
953
 
954
  if visual_chatgpt is not None:
 
941
  raise NotImplementedError
942
 
943
  async def chat_input_callback(*args):
944
+ visual_chatgpt, chat_input, click_state, state, aux_state ,language , autoplay,gender,api_key,image_input,log_state,history,persona = args
945
  message = chat_input["text"]
946
  if persona == "Narrator":
947
+ prompt="Please help me answer the question with this painting {question} in {language}, with a response length of about 70 words.."
948
  elif persona =="Artist":
949
+ prompt="When generating the answer, you should tell others that you are one of the creators of these paintings and generate the text in the tone and manner as if you are the creator of the painting. Please help me answer the question with this painting {question} in {language}, with a response length of about 70 words."
950
  else:
951
+ prompt="When generating answers, you should tell people that you are the object itself that was selected, and generate text in the tone and manner in which you are the object or the person. Please help me answer the question with this painting {question} in {language}, with a response length of about 70 words."
952
  prompt=prompt.format(question=message, language=language)
953
 
954
  if visual_chatgpt is not None: