nrotem commited on
Commit
89b7071
1 Parent(s): dbbe3d9
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,10 +31,10 @@ def combine_video_subtitle(video_file :_TemporaryFileWrapper , subtitle_file):
31
  output_file
32
  ]
33
 
34
- subprocess.run(cmd1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
35
 
36
 
37
- return output_file
38
  except subprocess.CalledProcessError as e:
39
  error_message = f"An error occurred: {e.returncode}\n{e.stderr.decode()}"
40
  print(error_message)
@@ -46,7 +46,7 @@ inputs = [
46
  gr.inputs.File(label="Subtitle File")
47
  ]
48
 
49
- outputs = [gr.outputs.File(label="Combined Video with Subtitle")]
50
 
51
  title = "Video Subtitle Combiner"
52
  description = "Combine a video file and a subtitle file using ffmpeg."
 
31
  output_file
32
  ]
33
 
34
+ res = subprocess.run(cmd1, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
35
 
36
 
37
+ return [output_file ,res]
38
  except subprocess.CalledProcessError as e:
39
  error_message = f"An error occurred: {e.returncode}\n{e.stderr.decode()}"
40
  print(error_message)
 
46
  gr.inputs.File(label="Subtitle File")
47
  ]
48
 
49
+ outputs = [gr.outputs.File(label="Combined Video with Subtitle") ,gr.Textbox()]
50
 
51
  title = "Video Subtitle Combiner"
52
  description = "Combine a video file and a subtitle file using ffmpeg."