Kryptone commited on
Commit
d072021
·
verified ·
1 Parent(s): 51e2d1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -49,9 +49,8 @@ def mp4_to_wav_or_mp3(mp4fileuploader, file_format, random_filename):
49
  output_filename = "convertedaudio.mp3" if not random_filename else f"convertedaudio_{random.randint(1000, 9999)}.mp3"
50
  videoinput.write_audiofile(output_filename)
51
  videoinput.close()
52
- what_to_return = "convertedaudio.wav" if file_format == "wav" else "convertedaudio.mp3"
53
  os.remove(mp4fileuploader)
54
- return "Converted mp4 file successfully!", what_to_return
55
  except:
56
  raise gr.Error(traceback.format_exc())
57
 
 
49
  output_filename = "convertedaudio.mp3" if not random_filename else f"convertedaudio_{random.randint(1000, 9999)}.mp3"
50
  videoinput.write_audiofile(output_filename)
51
  videoinput.close()
 
52
  os.remove(mp4fileuploader)
53
+ return "Converted mp4 file successfully!", output_filename
54
  except:
55
  raise gr.Error(traceback.format_exc())
56