Spaces:
Runtime error
Runtime error
import cv2 | |
import os | |
import gradio as gr | |
def split_video(video_path, split_duration): | |
#... rest of your code... | |
iface = gr.Interface( | |
fn=split_video, | |
title="Split Video by Time", | |
description="Split a video into multiple parts based on specified duration.", | |
inputs=[ | |
gr.inputs.File(type="video", label="Select Video File"), | |
gr.Number(default=5, label="Split Duration (seconds)") | |
], | |
outputs=[gr.File(file_type="mp4", label="Video Parts")], | |
live=True | |
) | |
iface.launch() |