Sagicc commited on
Commit
4332eda
1 Parent(s): b88a5bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import gradio as gr
5
 
6
  MODEL_NAME = "Sagicc/whisper-large-v3-sr-combined"
7
  BATCH_SIZE = 8
 
8
 
9
  device = 0 if torch.cuda.is_available() else "cpu"
10
 
@@ -38,7 +39,7 @@ def format_timestamp(seconds: float, always_include_hours: bool = False, decimal
38
 
39
 
40
  def transcribe(file, task, return_timestamps):
41
- outputs = pipe(file, batch_size=BATCH_SIZE, language="sr", generate_kwargs={"task": task}, return_timestamps=return_timestamps)
42
  text = outputs["text"]
43
  if return_timestamps:
44
  timestamps = outputs["chunks"]
 
5
 
6
  MODEL_NAME = "Sagicc/whisper-large-v3-sr-combined"
7
  BATCH_SIZE = 8
8
+ lang = "sr"
9
 
10
  device = 0 if torch.cuda.is_available() else "cpu"
11
 
 
39
 
40
 
41
  def transcribe(file, task, return_timestamps):
42
+ outputs = pipe(file, batch_size=BATCH_SIZE, language=lang, generate_kwargs={"task": task}, return_timestamps=return_timestamps)
43
  text = outputs["text"]
44
  if return_timestamps:
45
  timestamps = outputs["chunks"]