Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
#13
by
MaziyarPanahi
- opened
app.py
CHANGED
@@ -82,6 +82,8 @@ def bot_streaming(message, history):
|
|
82 |
buffer = ""
|
83 |
time.sleep(0.5)
|
84 |
for new_text in streamer:
|
|
|
|
|
85 |
buffer += new_text
|
86 |
|
87 |
generated_text_without_prompt = buffer
|
|
|
82 |
buffer = ""
|
83 |
time.sleep(0.5)
|
84 |
for new_text in streamer:
|
85 |
+
if "<|end|>" in new_text:
|
86 |
+
break
|
87 |
buffer += new_text
|
88 |
|
89 |
generated_text_without_prompt = buffer
|