mrbeliever commited on
Commit
bd44775
·
verified ·
1 Parent(s): 50f84a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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")