Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,12 @@ def generate(
|
|
56 |
outputs = []
|
57 |
for text in streamer:
|
58 |
outputs.append(text)
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
chat_interface = gr.ChatInterface(
|
62 |
fn=generate,
|
|
|
56 |
outputs = []
|
57 |
for text in streamer:
|
58 |
outputs.append(text)
|
59 |
+
generated_text = "".join(outputs)
|
60 |
+
if "<s>" in generated_text:
|
61 |
+
yield generated_text[:generated_text.index("<s>")+3]
|
62 |
+
break
|
63 |
+
yield generated_text
|
64 |
+
|
65 |
|
66 |
chat_interface = gr.ChatInterface(
|
67 |
fn=generate,
|