ginipick commited on
Commit
1a2d5b4
·
verified ·
1 Parent(s): a6582cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -652,21 +652,23 @@ Don't let this moment fade, hold me close tonight
652
  except Exception as e:
653
  status_text = f"❌ Error: {str(e)}"
654
  return None, history, "", status_text
655
-
656
-
657
-
658
- # 이벤트 핸들러
659
  lyrics_txt.change(
660
  fn=update_info,
661
  inputs=[lyrics_txt],
662
  outputs=[duration_info, sections_info]
663
  )
664
-
665
-
666
-
 
 
 
 
667
 
668
  return demo
669
 
 
670
  if __name__ == "__main__":
671
  demo = main()
672
  demo.queue(max_size=20).launch(
 
652
  except Exception as e:
653
  status_text = f"❌ Error: {str(e)}"
654
  return None, history, "", status_text
655
+ # 이벤트 핸들러
 
 
 
656
  lyrics_txt.change(
657
  fn=update_info,
658
  inputs=[lyrics_txt],
659
  outputs=[duration_info, sections_info]
660
  )
661
+
662
+ # submit 버튼 클릭 이벤트 추가
663
+ submit_btn.click(
664
+ fn=generate_with_progress,
665
+ inputs=[genre_txt, lyrics_txt, num_segments, max_new_tokens, history_state],
666
+ outputs=[music_out, history_state, history_container, progress]
667
+ )
668
 
669
  return demo
670
 
671
+
672
  if __name__ == "__main__":
673
  demo = main()
674
  demo.queue(max_size=20).launch(