Spaces:
Running
Running
Ankush Rana
commited on
Commit
·
88a8f61
1
Parent(s):
23dbd9b
change to largev3
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import torch
|
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
torch_dtype = "float32"
|
9 |
|
10 |
-
MODEL_NAME = "Systran/faster-whisper-
|
11 |
print("Loading model ...")
|
12 |
model = WhisperModel(MODEL_NAME, compute_type=torch_dtype)
|
13 |
print("Loading model done.")
|
@@ -23,6 +23,8 @@ def transcribe(inputs):
|
|
23 |
# chunk_length=30,
|
24 |
task="transcribe",
|
25 |
word_timestamps=False,
|
|
|
|
|
26 |
)
|
27 |
|
28 |
text = ""
|
@@ -47,7 +49,7 @@ with gr.Blocks(theme=theme) as demo:
|
|
47 |
input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio")
|
48 |
|
49 |
with gr.Column(scale=1):
|
50 |
-
output = gr.Textbox(label="Output"
|
51 |
|
52 |
with gr.Row(variant="panel"):
|
53 |
clear_btn = gr.Button("Clear")
|
|
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
torch_dtype = "float32"
|
9 |
|
10 |
+
MODEL_NAME = "Systran/faster-whisper-large-v3"
|
11 |
print("Loading model ...")
|
12 |
model = WhisperModel(MODEL_NAME, compute_type=torch_dtype)
|
13 |
print("Loading model done.")
|
|
|
23 |
# chunk_length=30,
|
24 |
task="transcribe",
|
25 |
word_timestamps=False,
|
26 |
+
repetition_penalty=1.2,
|
27 |
+
without_timestamps=True
|
28 |
)
|
29 |
|
30 |
text = ""
|
|
|
49 |
input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio")
|
50 |
|
51 |
with gr.Column(scale=1):
|
52 |
+
output = gr.Textbox(label="Output")
|
53 |
|
54 |
with gr.Row(variant="panel"):
|
55 |
clear_btn = gr.Button("Clear")
|