MySafeCode commited on
Commit
7333778
·
verified ·
1 Parent(s): 9f4a7b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import re
3
 
4
- def getmp3(url: str):
5
  """
6
  Convert a Suno song URL to the direct MP3 link.
7
  Returns a tuple: (displayed URL, downloadable URL)
@@ -16,7 +16,7 @@ def getmp3(url: str):
16
 
17
  # Define the Gradio interface
18
  demo = gr.Interface(
19
- fn=getmp3,
20
  inputs=gr.Textbox(label="Enter Suno song URL", placeholder="https://suno.com/song/..."),
21
  outputs=[
22
  gr.Textbox(label="MP3 URL"),
@@ -24,11 +24,8 @@ demo = gr.Interface(
24
  ],
25
  title="Suno → MP3 Converter",
26
  description="Enter any Suno song URL to get a direct MP3 link."
27
-
28
  )
29
 
30
  # Launch the Space
31
  if __name__ == "__main__":
32
- demo.launch(share=True, debug=True)
33
- # 👈 This enables /api
34
-
 
1
  import gradio as gr
2
  import re
3
 
4
+ def convert_url_to_mp3(url: str):
5
  """
6
  Convert a Suno song URL to the direct MP3 link.
7
  Returns a tuple: (displayed URL, downloadable URL)
 
16
 
17
  # Define the Gradio interface
18
  demo = gr.Interface(
19
+ fn=convert_url_to_mp3, # Use the function name convert_url_to_mp3
20
  inputs=gr.Textbox(label="Enter Suno song URL", placeholder="https://suno.com/song/..."),
21
  outputs=[
22
  gr.Textbox(label="MP3 URL"),
 
24
  ],
25
  title="Suno → MP3 Converter",
26
  description="Enter any Suno song URL to get a direct MP3 link."
 
27
  )
28
 
29
  # Launch the Space
30
  if __name__ == "__main__":
31
+ demo.launch(share=True, debug=True)