Spaces:
Running
Running
nicpopovic
commited on
Commit
•
476e054
1
Parent(s):
82a7d32
Update app.py
Browse files
app.py
CHANGED
@@ -376,7 +376,7 @@ def generate_text(input_text, messages=None):
|
|
376 |
|
377 |
if output.endswith("<|end_header_id|>\n\n"):
|
378 |
continue
|
379 |
-
html_out = output.replace("<|endoftext|>", "").replace("<|begin_of_text|>", "").strip().split("<|end_header_id
|
380 |
|
381 |
yield [messages[-1]] + [{"role": "assistant", "content": html_out}]
|
382 |
return
|
|
|
376 |
|
377 |
if output.endswith("<|end_header_id|>\n\n"):
|
378 |
continue
|
379 |
+
html_out = output.replace("<|endoftext|>", "").replace("<|begin_of_text|>", "").strip().split("<|end_header_id|>")[-1].replace("**", "")
|
380 |
|
381 |
yield [messages[-1]] + [{"role": "assistant", "content": html_out}]
|
382 |
return
|