TanelAlumae commited on
Commit
d9c891d
·
verified ·
1 Parent(s): 46febb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,7 @@ from transformers.pipelines.audio_utils import ffmpeg_read
9
  import tempfile
10
  import os
11
 
12
- MODEL_NAME = "TalTechNLP/whisper-large-v3-turbo-et-subs"
13
  BATCH_SIZE = 8
14
  FILE_LIMIT_MB = 1000
15
  YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
@@ -84,8 +84,8 @@ def transcribe(file_path):
84
 
85
  # Calculate the length in seconds
86
  audio_length = len(audio_data) / 16000
87
- #expected_transcribe_duration = max(59, int(audio_length / 5.0))
88
- expected_transcribe_duration = 59
89
  gr.Info(f"Starting to transcribe, requesting a GPU for {expected_transcribe_duration} seconds")
90
  return dynamic_gpu_duration(do_transcribe, expected_transcribe_duration, file_path)
91
 
 
9
  import tempfile
10
  import os
11
 
12
+ MODEL_NAME = "TalTechNLP/whisper-large-v3-et-subs"
13
  BATCH_SIZE = 8
14
  FILE_LIMIT_MB = 1000
15
  YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
 
84
 
85
  # Calculate the length in seconds
86
  audio_length = len(audio_data) / 16000
87
+ expected_transcribe_duration = max(59, int(audio_length / 5.0))
88
+ #expected_transcribe_duration = 59
89
  gr.Info(f"Starting to transcribe, requesting a GPU for {expected_transcribe_duration} seconds")
90
  return dynamic_gpu_duration(do_transcribe, expected_transcribe_duration, file_path)
91