Spaces:
Running
Running
Update app.py
Browse files
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 ,
|
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
|
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
|
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
|
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:
|