Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ subprocess.run(
|
|
17 |
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
torch_dtype = torch.float16
|
20 |
-
MODEL_NAME = "
|
21 |
|
22 |
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
23 |
MODEL_NAME, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True, attn_implementation="flash_attention_2"
|
@@ -79,7 +79,7 @@ def clear():
|
|
79 |
|
80 |
with gr.Blocks() as microphone:
|
81 |
with gr.Column():
|
82 |
-
gr.Markdown(f"# Realtime Whisper Large V3 Turbo: \n Transcribe Audio in Realtime. This Demo uses the Checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers.\n Note: The first token takes about 5 seconds. After that, it works flawlessly.")
|
83 |
with gr.Row():
|
84 |
input_audio_microphone = gr.Audio(streaming=True)
|
85 |
output = gr.Textbox(label="Transcription", value="")
|
@@ -92,7 +92,7 @@ with gr.Blocks() as microphone:
|
|
92 |
|
93 |
with gr.Blocks() as file:
|
94 |
with gr.Column():
|
95 |
-
gr.Markdown(f"# Realtime Whisper Large V3 Turbo: \n Transcribe Audio in Realtime. This Demo uses the Checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers.\n Note: The first token takes about 5 seconds. After that, it works flawlessly.")
|
96 |
with gr.Row():
|
97 |
input_audio_microphone = gr.Audio(sources="upload", type="numpy")
|
98 |
output = gr.Textbox(label="Transcription", value="")
|
|
|
17 |
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
torch_dtype = torch.float16
|
20 |
+
MODEL_NAME = "primeline/whisper-large-v3-turbo-german"
|
21 |
|
22 |
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
23 |
MODEL_NAME, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True, attn_implementation="flash_attention_2"
|
|
|
79 |
|
80 |
with gr.Blocks() as microphone:
|
81 |
with gr.Column():
|
82 |
+
gr.Markdown(f"# Realtime Whisper Large V3 Turbo German: \n Transcribe Audio in Realtime. This Demo uses the Checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers.\n Note: The first token takes about 5 seconds. After that, it works flawlessly.")
|
83 |
with gr.Row():
|
84 |
input_audio_microphone = gr.Audio(streaming=True)
|
85 |
output = gr.Textbox(label="Transcription", value="")
|
|
|
92 |
|
93 |
with gr.Blocks() as file:
|
94 |
with gr.Column():
|
95 |
+
gr.Markdown(f"# Realtime Whisper Large V3 Turbo German: \n Transcribe Audio in Realtime. This Demo uses the Checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers.\n Note: The first token takes about 5 seconds. After that, it works flawlessly.")
|
96 |
with gr.Row():
|
97 |
input_audio_microphone = gr.Audio(sources="upload", type="numpy")
|
98 |
output = gr.Textbox(label="Transcription", value="")
|