Spaces:
Running
Running
mrbeliever
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -37,8 +37,8 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
|
|
37 |
|
38 |
for response in stream:
|
39 |
output += response.token.text
|
40 |
-
yield output
|
41 |
-
return output
|
42 |
|
43 |
with gr.Blocks() as demo:
|
44 |
input_text = gr.Textbox(placeholder="Enter your prompt here...", lines=2, max_lines=2, label="Prompt")
|
|
|
37 |
|
38 |
for response in stream:
|
39 |
output += response.token.text
|
40 |
+
yield output.strip('</s>')
|
41 |
+
return output.strip('</s>')
|
42 |
|
43 |
with gr.Blocks() as demo:
|
44 |
input_text = gr.Textbox(placeholder="Enter your prompt here...", lines=2, max_lines=2, label="Prompt")
|