Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import os
|
| 2 |
-
import moviepy.
|
| 3 |
import gradio as gr
|
| 4 |
from concurrent.futures import ThreadPoolExecutor
|
| 5 |
|
|
@@ -52,4 +52,20 @@ def process_part(video, start_time, end_time, resolution, quality, audio_enabled
|
|
| 52 |
|
| 53 |
return output_filename
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
+
import moviepy.video.io.VideoFileClip as mp
|
| 3 |
import gradio as gr
|
| 4 |
from concurrent.futures import ThreadPoolExecutor
|
| 5 |
|
|
|
|
| 52 |
|
| 53 |
return output_filename
|
| 54 |
|
| 55 |
+
iface = gr.Interface(
|
| 56 |
+
fn=split_video,
|
| 57 |
+
inputs=[
|
| 58 |
+
gr.File(label="Upload Video"),
|
| 59 |
+
gr.Slider(minimum=2, maximum=10, value=2, label="Number of Parts"),
|
| 60 |
+
gr.Dropdown(choices=["720p", "1080p", "4K"], label="Resolution"),
|
| 61 |
+
gr.Dropdown(choices=["Низкое", "Среднее", "Высокое"], label="Качество"),
|
| 62 |
+
gr.Checkbox(label="Включить звук"),
|
| 63 |
+
gr.Slider(minimum=0, maximum=2, value=1, label="Громкость"),
|
| 64 |
+
],
|
| 65 |
+
outputs=gr.Files(label="Download Split Videos"),
|
| 66 |
+
title="Video Splitter",
|
| 67 |
+
description="Upload your video and select how many parts you want to split it into."
|
| 68 |
+
)
|
| 69 |
+
|
| 70 |
+
if __name__ == "__main__":
|
| 71 |
+
iface.launch()
|