Spaces:
Building
on
L40S
Building
on
L40S
Update app.py
Browse files
app.py
CHANGED
@@ -462,7 +462,7 @@ def main():
|
|
462 |
with gr.Row(elem_id="header"):
|
463 |
gr.Markdown(
|
464 |
"""
|
465 |
-
# π΅
|
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
|
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,
|
638 |
progress.update(value="π΅ Starting generation...")
|
639 |
try:
|
640 |
-
result = infer(genre, lyrics,
|
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)
|