NLPV commited on
Commit
dfbed35
·
verified ·
1 Parent(s): 6d7553e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -39,7 +39,8 @@ def transcribe_and_translate(audio_file, selected_language, model_type="base"):
39
  :param model_type: Whisper model type (default is 'base')
40
  :return: Transcription and translation
41
  """
42
- temp_audio_path = os.path.join(BASE_DIR, audio_file.name)
 
43
 
44
  # Save the uploaded file to a temporary location
45
  with open(temp_audio_path, "wb") as f:
 
39
  :param model_type: Whisper model type (default is 'base')
40
  :return: Transcription and translation
41
  """
42
+ #temp_audio_path = os.path.join(BASE_DIR, audio_file.name)
43
+ temp_audio_path = os.path.join(BASE_DIR, os.path.basename(audio_file))
44
 
45
  # Save the uploaded file to a temporary location
46
  with open(temp_audio_path, "wb") as f: