MikeMann commited on
Commit
4a7de3e
·
1 Parent(s): 13768d7

fixed response

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -545,12 +545,12 @@ if __name__ == '__main__':
545
  image_gallery = returnImages()
546
 
547
  for token in bot_response:
548
- if "eot_id" in token.choices[0].delta.content:
549
- token = token.replace("<|eot_id|>","")
550
- if token.choices[0].delta.content.startswith("-"):
551
- token = f"\n{token}"
552
- if re.match(r"^[1-9]\.",token.choices[0].delta.content):
553
- token = f"\n{token}"
554
 
555
  history[-1]['content'] += token.choices[0].delta.content
556
  yield history, image_gallery
 
545
  image_gallery = returnImages()
546
 
547
  for token in bot_response:
548
+ #if "eot_id" in token.choices[0].delta.content:
549
+ # token = token.replace("<|eot_id|>","")
550
+ #if token.choices[0].delta.content.startswith("-"):
551
+ # token = f"\n{token}"
552
+ #if re.match(r"^[1-9]\.",token.choices[0].delta.content):
553
+ # token = f"\n{token}"
554
 
555
  history[-1]['content'] += token.choices[0].delta.content
556
  yield history, image_gallery