akera commited on
Commit
1189a51
·
verified ·
1 Parent(s): d630be3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,11 +20,11 @@ languages = list(target_lang_options.keys())
20
 
21
 
22
  # Transcribe audio using custom model
23
- def transcribe_audio(input_file, language,
24
- device, model_id=model_id,
25
- chunk_length_s=10, stride_length_s=(4, 2), return_timestamps="word"):
26
 
27
 
 
28
  target_lang_code = target_lang_options[target_lang_code]
29
 
30
  # Determine the model_id based on the language
 
20
 
21
 
22
  # Transcribe audio using custom model
23
+ def transcribe_audio(input_file, language,chunk_length_s=10,
24
+ stride_length_s=(4, 2), return_timestamps="word"):
 
25
 
26
 
27
+ device = "cuda" if torch.cuda.is_available() else "cpu"
28
  target_lang_code = target_lang_options[target_lang_code]
29
 
30
  # Determine the model_id based on the language