Issamohammed commited on
Commit
1f27015
·
verified ·
1 Parent(s): fb69e6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -2,8 +2,8 @@ import torch
2
  from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
3
  import gradio as gr
4
 
5
- device = "cuda" if torch.cuda.is_available() else "cpu"
6
- torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
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 Transcriber",
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()