Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
|
|
|
3 |
def get_audio():
|
4 |
-
return "https://huggingface.co/spaces/Namazlol/my-audio-hosting/
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
# Function to return the MP3 file URL
|
4 |
def get_audio():
|
5 |
+
return "https://huggingface.co/spaces/Namazlol/my-audio-hosting/resolve/main/mysong.mp3"
|
6 |
|
7 |
+
# Gradio UI with an audio player
|
8 |
+
demo = gr.Interface(
|
9 |
+
fn=get_audio,
|
10 |
+
inputs=[],
|
11 |
+
outputs="audio",
|
12 |
+
title="Audio Player",
|
13 |
+
description="Click play to listen to the song."
|
14 |
+
)
|
15 |
+
|
16 |
+
# Launch the Space
|
17 |
demo.launch()
|