Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,25 @@
|
|
1 |
import gradio as gr
|
2 |
-
import os
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
+
# import os
|
3 |
+
# os.environ.get("HF_REPO_ID")
|
4 |
+
# Define the function that will process the audio input
|
5 |
+
def process_audio(audio):
|
6 |
+
# Here you can add your audio processing code
|
7 |
+
return f"Received audio file: {audio}"
|
8 |
|
9 |
+
# Create a list of example audio files
|
10 |
+
examples = [
|
11 |
+
["https://huggingface.co/MedAiHealth/BanglaASR-MedAI/resolve/main/wav/sample_1.wav"],
|
12 |
+
["https://huggingface.co/MedAiHealth/BanglaASR-MedAI/resolve/main/wav/sample_2.wav"],
|
13 |
+
["https://huggingface.co/MedAiHealth/BanglaASR-MedAI/resolve/main/wav/sample_3.wav"]
|
14 |
+
]
|
15 |
+
|
16 |
+
# Create the Gradio interface
|
17 |
+
interface = gr.Interface(
|
18 |
+
fn=process_audio,
|
19 |
+
inputs=gr.Audio(source="upload", type="filepath"),
|
20 |
+
outputs=gr.Textbox(),
|
21 |
+
examples=examples
|
22 |
+
)
|
23 |
+
|
24 |
+
# Launch the interface
|
25 |
+
interface.launch()
|