Jeffgold commited on
Commit
1828f72
·
1 Parent(s): 13044c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -97,12 +97,10 @@ def upload_file_to_s3(file_path, s3_path):
97
  file.write(file_content)
98
 
99
  def convert_video(video_file, quality, aspect_ratio, video_url):
100
-
101
- def convert_video(video_file, quality, aspect_ratio, video_url):
102
  # Ensure either a file or a URL is provided
103
- if not video_file and not video_url:
104
- raise ValueError("Please provide either a video file or a video URL.")
105
-
106
  input_path = get_input_path(video_file, video_url)
107
 
108
  video = VideoFileClip(str(input_path))
@@ -149,7 +147,6 @@ def convert_video(video_file, quality, aspect_ratio, video_url):
149
  output_html = "<br>".join(output_links)
150
  return output_html
151
 
152
-
153
  video_file = gr.inputs.File(label="Your video file")
154
  quality = gr.inputs.Slider(minimum=1, maximum=50, label="Quality (1:Speed - 50:Quality)")
155
  aspect_ratio = gr.inputs.Dropdown(["16:9", "4:3", "1:1", "3:4", "9:16", "1:1", "2:1", "1:2"], label="Aspect Ratio", default="16:9")
 
97
  file.write(file_content)
98
 
99
  def convert_video(video_file, quality, aspect_ratio, video_url):
 
 
100
  # Ensure either a file or a URL is provided
101
+ if not video_file and not video_url:
102
+ raise ValueError("Please provide either a video file or a video URL.")
103
+
104
  input_path = get_input_path(video_file, video_url)
105
 
106
  video = VideoFileClip(str(input_path))
 
147
  output_html = "<br>".join(output_links)
148
  return output_html
149
 
 
150
  video_file = gr.inputs.File(label="Your video file")
151
  quality = gr.inputs.Slider(minimum=1, maximum=50, label="Quality (1:Speed - 50:Quality)")
152
  aspect_ratio = gr.inputs.Dropdown(["16:9", "4:3", "1:1", "3:4", "9:16", "1:1", "2:1", "1:2"], label="Aspect Ratio", default="16:9")