Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -201,18 +201,18 @@ def pred(image_input, role, conversation_starter_prompt_rules, conversation_star
|
|
| 201 |
iter += 1
|
| 202 |
return "Fast", iter-1 , question, transform_text_to_speech(question)
|
| 203 |
if iter > 1 and iter <= 3:
|
|
|
|
| 204 |
prompt = CONVERSATION_STARTER2_PROMPT.format(role = role, history=memory,rules = conversation_starter2_prompt_rules)
|
| 205 |
res = fast_thinking(image_path, prompt, temperature)
|
| 206 |
acknowledgement_followback_question = res
|
| 207 |
-
memory += "\n" + "User: " + reply
|
| 208 |
memory += "\n" + "Good Friend: "+ acknowledgement_followback_question
|
| 209 |
iter += 1
|
| 210 |
return "Fast", iter-1 , acknowledgement_followback_question, transform_text_to_speech(acknowledgement_followback_question)
|
| 211 |
if iter > 3:
|
|
|
|
| 212 |
prompt = CONVERSATION_EXPANDING_PROMPT.format(role = role, history=memory, rules = conversation_expanding_prompt_rules)
|
| 213 |
res = fast_thinking(image_path, prompt, temperature)
|
| 214 |
acknowledgement_followback_question = res
|
| 215 |
-
memory += "\n" + "User: " + reply
|
| 216 |
memory += "\n" + "Good Friend: "+ acknowledgement_followback_question
|
| 217 |
iter += 1
|
| 218 |
return "Fast", iter-1 , acknowledgement_followback_question, transform_text_to_speech(acknowledgement_followback_question)
|
|
|
|
| 201 |
iter += 1
|
| 202 |
return "Fast", iter-1 , question, transform_text_to_speech(question)
|
| 203 |
if iter > 1 and iter <= 3:
|
| 204 |
+
memory += "\n" + "User: " + reply
|
| 205 |
prompt = CONVERSATION_STARTER2_PROMPT.format(role = role, history=memory,rules = conversation_starter2_prompt_rules)
|
| 206 |
res = fast_thinking(image_path, prompt, temperature)
|
| 207 |
acknowledgement_followback_question = res
|
|
|
|
| 208 |
memory += "\n" + "Good Friend: "+ acknowledgement_followback_question
|
| 209 |
iter += 1
|
| 210 |
return "Fast", iter-1 , acknowledgement_followback_question, transform_text_to_speech(acknowledgement_followback_question)
|
| 211 |
if iter > 3:
|
| 212 |
+
memory += "\n" + "User: " + reply
|
| 213 |
prompt = CONVERSATION_EXPANDING_PROMPT.format(role = role, history=memory, rules = conversation_expanding_prompt_rules)
|
| 214 |
res = fast_thinking(image_path, prompt, temperature)
|
| 215 |
acknowledgement_followback_question = res
|
|
|
|
| 216 |
memory += "\n" + "Good Friend: "+ acknowledgement_followback_question
|
| 217 |
iter += 1
|
| 218 |
return "Fast", iter-1 , acknowledgement_followback_question, transform_text_to_speech(acknowledgement_followback_question)
|