eternalBlissard commited on
Commit
09de3a2
·
verified ·
1 Parent(s): c097d28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -9,8 +9,11 @@ def outputProducer(inputVideo):
9
  print(inputVideo)
10
  input_file = ffmpeg.input(inputVideo)
11
  input_file.output('audio.mp3', acodec='mp3').run()
12
- command2 = "whisper audio.mp3"
13
- retVal = subprocess.check_output(command2)
 
 
 
14
  return retVal
15
  demo = gr.Interface(fn=outputProducer,
16
  inputs = [gr.Video()],
 
9
  print(inputVideo)
10
  input_file = ffmpeg.input(inputVideo)
11
  input_file.output('audio.mp3', acodec='mp3').run()
12
+ command2 = "whisper ./audio.mp3"
13
+ try:
14
+ retVal = subprocess.check_output(command2)
15
+ except:
16
+ retVal = subprocess.check_output("ls")
17
  return retVal
18
  demo = gr.Interface(fn=outputProducer,
19
  inputs = [gr.Video()],