Spaces:
Dejansimic
/
Runtime error

fffiloni commited on
Commit
9151e4f
·
verified ·
1 Parent(s): a5a83e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -77,7 +77,7 @@ def empty_output_folder(output_dir):
77
  def create_temp_file(content, prefix, suffix=".txt"):
78
  temp_file = tempfile.NamedTemporaryFile(delete=False, mode="w", prefix=prefix, suffix=suffix)
79
  # Ensure content ends with newline and normalize line endings
80
- content = content.strip() + "\n\n" # Add extra newline at end
81
  content = content.replace("\r\n", "\n").replace("\r", "\n")
82
  temp_file.write(content)
83
  temp_file.close()
@@ -207,7 +207,7 @@ Stay with me forever, let our love just flow
207
  inputs = [genre_txt, lyrics_txt]
208
  )
209
  with gr.Column():
210
- num_segments = gr.Number(label="Number of Song Segments", info="number of paragraphs", value=1, interactive=False)
211
  max_new_tokens = gr.Slider(label="Max New Tokens / Duration", info="1000 token = 10 seconds", minimum=500, maximum="24000", step=500, value=1500, interactive=False)
212
  submit_btn = gr.Button("Submit")
213
  music_out = gr.Audio(label="Audio Result")
 
77
  def create_temp_file(content, prefix, suffix=".txt"):
78
  temp_file = tempfile.NamedTemporaryFile(delete=False, mode="w", prefix=prefix, suffix=suffix)
79
  # Ensure content ends with newline and normalize line endings
80
+ #content = content.strip() + "\n\n" # Add extra newline at end
81
  content = content.replace("\r\n", "\n").replace("\r", "\n")
82
  temp_file.write(content)
83
  temp_file.close()
 
207
  inputs = [genre_txt, lyrics_txt]
208
  )
209
  with gr.Column():
210
+ num_segments = gr.Number(label="Number of Song Segments", info="number of paragraphs", value=2, interactive=False)
211
  max_new_tokens = gr.Slider(label="Max New Tokens / Duration", info="1000 token = 10 seconds", minimum=500, maximum="24000", step=500, value=1500, interactive=False)
212
  submit_btn = gr.Button("Submit")
213
  music_out = gr.Audio(label="Audio Result")