Spaces:
Running
Running
gospacedev
commited on
Commit
•
b0d7588
1
Parent(s):
b064d79
add rsplit to avoid eos token on model output
Browse files
app.py
CHANGED
@@ -52,8 +52,9 @@ def generate_emoji_translation(prompt):
|
|
52 |
|
53 |
for response in stream:
|
54 |
output += response.token.text
|
|
|
55 |
|
56 |
-
return output
|
57 |
|
58 |
|
59 |
with gr.Blocks() as demo:
|
|
|
52 |
|
53 |
for response in stream:
|
54 |
output += response.token.text
|
55 |
+
yield output.rsplit("<", 1)[0]
|
56 |
|
57 |
+
return output.rsplit("<", 1)[0]
|
58 |
|
59 |
|
60 |
with gr.Blocks() as demo:
|