Vira21 commited on
Commit
c389be6
·
verified ·
1 Parent(s): 546429d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -2,13 +2,21 @@ import torch
2
  import gradio as gr
3
  from huggingface_hub import model_info
4
 
5
- # Load the Gradio model interface
6
  interface = gr.load("models/Vira21/Whisper-Base-KhmerV2")
7
 
8
  # Path to the example WAV file
9
- example_audio_path = "Example Audio/126.wav"
10
 
11
- # Add the example WAV file in the Gradio interface
12
- interface.launch(
13
- examples=[[example_audio_path]],
 
 
 
 
 
14
  )
 
 
 
 
2
  import gradio as gr
3
  from huggingface_hub import model_info
4
 
5
+ # Load the Gradio model interface from Hugging Face
6
  interface = gr.load("models/Vira21/Whisper-Base-KhmerV2")
7
 
8
  # Path to the example WAV file
9
+ example_audio_path = "Example Audio/126.wav" # Replace with the correct path
10
 
11
+ # Re-create the Gradio Interface with the examples parameter
12
+ interface_with_examples = gr.Interface(
13
+ fn=interface.fn,
14
+ inputs=interface.inputs,
15
+ outputs=interface.outputs,
16
+ examples=[[example_audio_path]], # Add example here
17
+ title=interface.title,
18
+ description=interface.description,
19
  )
20
+
21
+ # Launch the modified interface
22
+ interface_with_examples.launch()