fixed response
Browse files
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 |
-
|
550 |
-
if token.choices[0].delta.content.startswith("-"):
|
551 |
-
|
552 |
-
if re.match(r"^[1-9]\.",token.choices[0].delta.content):
|
553 |
-
|
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
|