Spaces:
Runtime error
Runtime error
fix: post process show / as **
Browse files
app.py
CHANGED
@@ -128,7 +128,7 @@ def format_prompt(message, history, system_prompt):
|
|
128 |
prompt += f"{user_prompt}"
|
129 |
prompt += f"{bot_response}"
|
130 |
prompt += f"""{message}"""
|
131 |
-
return prompt.replace('\n','؛').replace('\t','/').strip()
|
132 |
|
133 |
def generate(
|
134 |
prompt, history, system_prompt,
|
@@ -414,7 +414,7 @@ class Chatbot(gr.Chatbot):
|
|
414 |
)
|
415 |
processed_messages.append(
|
416 |
[
|
417 |
-
None,self._postprocess_chat_messages((result).replace('؛','\n').replace('/','
|
418 |
#self._postprocess_chat_messages(message_pair[1])),
|
419 |
]
|
420 |
)
|
|
|
128 |
prompt += f"{user_prompt}"
|
129 |
prompt += f"{bot_response}"
|
130 |
prompt += f"""{message}"""
|
131 |
+
return prompt.replace('\n','؛').replace('\t','/').replace(' ** ','/').strip()
|
132 |
|
133 |
def generate(
|
134 |
prompt, history, system_prompt,
|
|
|
414 |
)
|
415 |
processed_messages.append(
|
416 |
[
|
417 |
+
None,self._postprocess_chat_messages((result).replace('؛','\n').replace('/',' ** ').strip())
|
418 |
#self._postprocess_chat_messages(message_pair[1])),
|
419 |
]
|
420 |
)
|