Spaces:
Running
Running
Update app.py
Browse files
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 |
-
#
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
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()
|