AndrewRWilliams commited on
Commit
76e73dd
1 Parent(s): 622ff96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,13 +34,13 @@ def slugify(value, allow_unicode=False):
34
 
35
  async def transcribe(file):
36
 
37
- audio = whisper.load_audio(file.name)
38
  # transcribe_options = dict(beam_size=5, best_of=5, without_timestamps=False)
39
 
40
  # result = model.transcribe(file, **transcribe_options)
41
  result = model.transcribe(audio)
42
 
43
- file_path = pathlib.Path(file.name)
44
  sourceName = file_path.stem[:MAX_FILE_PREFIX_LENGTH] + file_path.suffix
45
  filePrefix = slugify(sourceName, allow_unicode=True)
46
 
 
34
 
35
  async def transcribe(file):
36
 
37
+ audio = whisper.load_audio(file)
38
  # transcribe_options = dict(beam_size=5, best_of=5, without_timestamps=False)
39
 
40
  # result = model.transcribe(file, **transcribe_options)
41
  result = model.transcribe(audio)
42
 
43
+ file_path = pathlib.Path(file)
44
  sourceName = file_path.stem[:MAX_FILE_PREFIX_LENGTH] + file_path.suffix
45
  filePrefix = slugify(sourceName, allow_unicode=True)
46