hungchiayu commited on
Commit
e42ec04
·
verified ·
1 Parent(s): a83d291

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -35,6 +35,7 @@ def gradio_generate(prompt, steps, guidance,duration=10):
35
  #print(f"Saving audio to file: {unique_filename}")
36
 
37
  # Save to file
 
38
  torchaudio.save(filename, output, 44100)
39
 
40
 
 
35
  #print(f"Saving audio to file: {unique_filename}")
36
 
37
  # Save to file
38
+ output = output[:,:int(duration*44100)]
39
  torchaudio.save(filename, output, 44100)
40
 
41