ginipick commited on
Commit
9f11480
Β·
verified Β·
1 Parent(s): 7e28ce1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -462,7 +462,7 @@ def main():
462
  with gr.Row(elem_id="header"):
463
  gr.Markdown(
464
  """
465
- # 🎡 Open SUNO: AI Music Generator
466
  ### Create complete songs from your lyrics in multiple languages
467
  """,
468
  elem_id="title"
@@ -526,10 +526,12 @@ def main():
526
  with gr.Row():
527
  history_container = gr.HTML("""
528
  <div id="history-container" style="width: 100%; padding: 10px;">
529
- <h3>Generation History</h3>
530
  <div id="history-list"></div>
531
  </div>
532
  """)
 
 
533
  history_state = gr.State([])
534
 
535
  # 예제 μ„Ήμ…˜
@@ -588,6 +590,10 @@ Don't let this moment fade, hold me close tonight
588
  """
589
  )
590
 
 
 
 
 
591
  # μ‹œμŠ€ν…œ μ΄ˆκΈ°ν™”
592
  initialize_system()
593
 
@@ -634,10 +640,10 @@ Don't let this moment fade, hold me close tonight
634
  outputs=[duration_info, sections_info]
635
  )
636
 
637
- def generate_with_progress(genre, lyrics, num_segments, max_tokens, history):
638
  progress.update(value="🎡 Starting generation...")
639
  try:
640
- result = infer(genre, lyrics, num_segments, max_tokens)
641
  if result:
642
  progress.update(value="βœ… Generation complete!")
643
  new_history, history_html = update_history(result, genre, lyrics, history)
 
462
  with gr.Row(elem_id="header"):
463
  gr.Markdown(
464
  """
465
+ # 🎡 AI Song Creator: Transform Your Lyrics into Complete Songs
466
  ### Create complete songs from your lyrics in multiple languages
467
  """,
468
  elem_id="title"
 
526
  with gr.Row():
527
  history_container = gr.HTML("""
528
  <div id="history-container" style="width: 100%; padding: 10px;">
529
+ <h3>🎡 Generation History</h3>
530
  <div id="history-list"></div>
531
  </div>
532
  """)
533
+
534
+ # νžˆμŠ€ν† λ¦¬ μƒνƒœ μ €μž₯
535
  history_state = gr.State([])
536
 
537
  # 예제 μ„Ήμ…˜
 
590
  """
591
  )
592
 
593
+ # μˆ¨κ²¨μ§„ μƒνƒœ λ³€μˆ˜λ“€
594
+ num_segments = gr.State(value=2) # κΈ°λ³Έκ°’ 2
595
+ max_new_tokens = gr.State(value=4000) # κΈ°λ³Έκ°’ 4000
596
+
597
  # μ‹œμŠ€ν…œ μ΄ˆκΈ°ν™”
598
  initialize_system()
599
 
 
640
  outputs=[duration_info, sections_info]
641
  )
642
 
643
+ def generate_with_progress(genre, lyrics, segments, tokens, history):
644
  progress.update(value="🎡 Starting generation...")
645
  try:
646
+ result = infer(genre, lyrics, segments, tokens)
647
  if result:
648
  progress.update(value="βœ… Generation complete!")
649
  new_history, history_html = update_history(result, genre, lyrics, history)