vpcom commited on
Commit
7915d0e
·
1 Parent(s): 4c1c552

fix: post process show / as **

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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('/','\t').strip())
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
  )