Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -944,11 +944,11 @@ 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}
|
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}."
|
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}."
|
952 |
prompt=prompt.format(question=message, language=language)
|
953 |
|
954 |
if visual_chatgpt is not None:
|
|
|
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 {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:
|