siddqamar commited on
Commit
0a219f7
·
verified ·
1 Parent(s): 39e0470

Update app.py

Browse files

fixing runtime error

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ model = whisper.load_model("base")
7
  def transcribe_audio(audio_file):
8
  # Check file size (e.g., 25MB limit)
9
  if os.path.getsize(audio_file.name) > 25 * 1024 * 1024:
10
- return "Error: File size exceeds 25MB limit.", ""
11
 
12
  result = model.transcribe(audio_file.name)
13
  output_filename = os.path.splitext(os.path.basename(audio_file.name))[0] + ".txt"
 
7
  def transcribe_audio(audio_file):
8
  # Check file size (e.g., 25MB limit)
9
  if os.path.getsize(audio_file.name) > 25 * 1024 * 1024:
10
+ return "Error: File size exceeds 25MB limit.", None
11
 
12
  result = model.transcribe(audio_file.name)
13
  output_filename = os.path.splitext(os.path.basename(audio_file.name))[0] + ".txt"