File size: 515 Bytes
abdd75f
 
20bee2f
 
abdd75f
289931f
abdd75f
 
 
 
 
289931f
 
 
 
abdd75f
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()