Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -377,14 +377,9 @@ def create_subtitle_clips(subtitles, videosize, fontsize, font, color, debug):
|
|
377 |
|
378 |
|
379 |
|
380 |
-
def process_video(url,
|
|
|
381 |
|
382 |
-
if isinstance(video, str):
|
383 |
-
input_video = video.split("/")[-1]
|
384 |
-
print(input_video)
|
385 |
-
input_audio = extract_audio(video)
|
386 |
-
input_video_name = input_video.replace(".mp4", "")
|
387 |
-
print(input_video_name)
|
388 |
if type=="insta":
|
389 |
input_video, image_path=insta_oneapi(url, api_key)
|
390 |
input_video_name = input_video.replace(".mp4", "")
|
@@ -438,6 +433,6 @@ def process_video(url,video, type):
|
|
438 |
def download_file(file_path):
|
439 |
return gr.File.update(file_path)
|
440 |
|
441 |
-
iface = gr.Interface(fn=process_video, inputs=[gr.Text(),
|
442 |
|
443 |
iface.launch(debug=True)
|
|
|
377 |
|
378 |
|
379 |
|
380 |
+
def process_video(url, type):
|
381 |
+
|
382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
383 |
if type=="insta":
|
384 |
input_video, image_path=insta_oneapi(url, api_key)
|
385 |
input_video_name = input_video.replace(".mp4", "")
|
|
|
433 |
def download_file(file_path):
|
434 |
return gr.File.update(file_path)
|
435 |
|
436 |
+
iface = gr.Interface(fn=process_video, inputs=[gr.Text(),gr.Dropdown(["insta","youtube"])], outputs="file")
|
437 |
|
438 |
iface.launch(debug=True)
|