broadfield commited on
Commit
8052ea6
·
verified ·
1 Parent(s): 2197af3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -36,9 +36,12 @@ def generate(prompt,history,max_new_tokens,seed):
36
  output = ""
37
 
38
  for response in stream:
39
- #output += response.token.text
 
 
 
 
40
  #yield output
41
- yield from pp.stream_tts(response.token.text)
42
 
43
  with gr.Blocks() as iface:
44
  gr.HTML("""""")
 
36
  output = ""
37
 
38
  for response in stream:
39
+ if response.token.text == "\n":
40
+ yield from pp.stream_tts(output)
41
+ output=""
42
+ output += response.token.text
43
+
44
  #yield output
 
45
 
46
  with gr.Blocks() as iface:
47
  gr.HTML("""""")