shariar076 commited on
Commit
e2052ea
1 Parent(s): d2def95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -5
app.py CHANGED
@@ -1,7 +1,25 @@
1
  import gradio as gr
2
- import os
 
 
 
 
 
3
 
4
- def greet(name):
5
- return "Hello " + name + "!!" + os.environ.get("HF_REPO_ID")
6
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()