KingNish mrfakename commited on
Commit
b986f28
1 Parent(s): 73c13c3

fix "/s" issue (#6)

Browse files

- fix "/s" issue (7b13d4034e5118536ff292916e23edd8d929ef2f)


Co-authored-by: mrfakename <mrfakename@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -41,7 +41,8 @@ async def generate1(prompt):
41
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=True)
42
  output = ""
43
  for response in stream:
44
- output += response.token.text
 
45
 
46
  communicate = edge_tts.Communicate(output)
47
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file:
 
41
  formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=True)
42
  output = ""
43
  for response in stream:
44
+ if not response.token.text == "</s>":
45
+ output += response.token.text
46
 
47
  communicate = edge_tts.Communicate(output)
48
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as tmp_file: