CharlieAmalet commited on
Commit
abc87ba
·
verified ·
1 Parent(s): 3c5db57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -20,8 +20,7 @@ DEVICE = 'cuda'
20
  loaded_model = whisper.load_model("medium", "cpu")
21
  current_size = "None"
22
 
23
- def generate_random_filename
24
- ():
25
  now = datetime.now()
26
  timestamp = now.strftime("%H_%M_%S_%d_%m_%Y")
27
  random_suffix = ''.join(random.choices('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', k=8))
@@ -29,8 +28,7 @@ def generate_random_filename
29
  return filename
30
 
31
  @spaces.GPU(enable_queue=True)
32
- def get_transcript(audio_path, task_selection:str, language:str, output_format:str, max_line_width=0
33
- , max_line_count=0, max_words_per_line=0):
34
  writer = get_writer(output_format.lower(), SAVE_DIR)
35
  writer_args = {
36
  "max_line_width": max_line_width if max_line_width > 0 else None,
 
20
  loaded_model = whisper.load_model("medium", "cpu")
21
  current_size = "None"
22
 
23
+ def generate_random_filename():
 
24
  now = datetime.now()
25
  timestamp = now.strftime("%H_%M_%S_%d_%m_%Y")
26
  random_suffix = ''.join(random.choices('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', k=8))
 
28
  return filename
29
 
30
  @spaces.GPU(enable_queue=True)
31
+ def get_transcript(audio_path, task_selection:str, language:str, output_format:str, max_line_width=0, max_line_count=0, max_words_per_line=0):
 
32
  writer = get_writer(output_format.lower(), SAVE_DIR)
33
  writer_args = {
34
  "max_line_width": max_line_width if max_line_width > 0 else None,