MySafeCode commited on
Commit
45123bc
·
verified ·
1 Parent(s): b023d11

Update aa.py

Browse files
Files changed (1) hide show
  1. aa.py +4 -1
aa.py CHANGED
@@ -322,7 +322,7 @@ def generate_song_from_text(lyrics_text, style, title, instrumental, model):
322
  yield f"## ✅ Request Submitted Successfully!\n\n"
323
  yield f"**🎯 Task ID:** `{task_id}`\n\n"
324
 
325
- # === NEW: Generate receipt immediately ===
326
  if title not in ["Generated Song", "Untitled", ""]:
327
  # Create receipt
328
  receipt = create_simple_receipt(task_id, title)
@@ -396,6 +396,9 @@ def parse_url_params(request: gr.Request):
396
  with gr.Blocks() as app:
397
  gr.Markdown("# 🎵 Suno Song Generator")
398
  gr.Markdown("Create songs from lyrics and style using Suno AI")
 
 
 
399
 
400
  with gr.TabItem("Audio Link"):
401
  gr.HTML("""
 
322
  yield f"## ✅ Request Submitted Successfully!\n\n"
323
  yield f"**🎯 Task ID:** `{task_id}`\n\n"
324
 
325
+ # Generate receipt immediately for custom titles
326
  if title not in ["Generated Song", "Untitled", ""]:
327
  # Create receipt
328
  receipt = create_simple_receipt(task_id, title)
 
396
  with gr.Blocks() as app:
397
  gr.Markdown("# 🎵 Suno Song Generator")
398
  gr.Markdown("Create songs from lyrics and style using Suno AI")
399
+
400
+ # Define state variables
401
+ initial_load_done = gr.State(value=False)
402
 
403
  with gr.TabItem("Audio Link"):
404
  gr.HTML("""