Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ import torch
|
|
| 2 |
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
-
device = "
|
| 6 |
-
torch_dtype = torch.
|
| 7 |
|
| 8 |
model_id = "KBLab/kb-whisper-large"
|
| 9 |
|
|
@@ -30,6 +30,6 @@ gr.Interface(
|
|
| 30 |
fn=transcribe,
|
| 31 |
inputs=gr.Audio(source="upload", type="filepath", label="Upload Swedish Audio"),
|
| 32 |
outputs=gr.Textbox(label="Transcribed Text"),
|
| 33 |
-
title="KB-Whisper Swedish
|
| 34 |
-
description="Transcribes Swedish audio using KBLab's Whisper Large model."
|
| 35 |
).launch()
|
|
|
|
| 2 |
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
+
device = "cpu" # Free CPU only
|
| 6 |
+
torch_dtype = torch.float32
|
| 7 |
|
| 8 |
model_id = "KBLab/kb-whisper-large"
|
| 9 |
|
|
|
|
| 30 |
fn=transcribe,
|
| 31 |
inputs=gr.Audio(source="upload", type="filepath", label="Upload Swedish Audio"),
|
| 32 |
outputs=gr.Textbox(label="Transcribed Text"),
|
| 33 |
+
title="KB-Whisper Transcriber (Swedish, Free CPU)",
|
| 34 |
+
description="Transcribes Swedish audio using KBLab's Whisper Large model. Running on free CPU — may be slow."
|
| 35 |
).launch()
|