Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ def convert_video_to_dumpscare(video_path, sensitivity):
|
|
| 37 |
out.release()
|
| 38 |
return output_path
|
| 39 |
|
| 40 |
-
# Gradio interface
|
| 41 |
def gradio_interface(video, sensitivity):
|
| 42 |
output_video = convert_video_to_dumpscare(video.name, sensitivity)
|
| 43 |
return output_video
|
|
@@ -47,12 +47,12 @@ iface = gr.Interface(
|
|
| 47 |
fn=gradio_interface,
|
| 48 |
inputs=[
|
| 49 |
gr.Video(label="Import Video"),
|
| 50 |
-
gr.Slider(minimum=0.0, maximum=1.0, value=0.5, label="Sensitivity"), #
|
|
|
|
| 51 |
],
|
| 52 |
outputs=gr.Video(label="Output Dumpscare Video"),
|
| 53 |
title="Dumpscare Video Converter",
|
| 54 |
description="Upload a video, set sensitivity, and click 'Cut' to process the video.",
|
| 55 |
-
live=True
|
| 56 |
)
|
| 57 |
|
| 58 |
iface.launch()
|
|
|
|
| 37 |
out.release()
|
| 38 |
return output_path
|
| 39 |
|
| 40 |
+
# Gradio interface function
|
| 41 |
def gradio_interface(video, sensitivity):
|
| 42 |
output_video = convert_video_to_dumpscare(video.name, sensitivity)
|
| 43 |
return output_video
|
|
|
|
| 47 |
fn=gradio_interface,
|
| 48 |
inputs=[
|
| 49 |
gr.Video(label="Import Video"),
|
| 50 |
+
gr.Slider(minimum=0.0, maximum=1.0, value=0.5, label="Sensitivity"), # Slider for sensitivity
|
| 51 |
+
gr.Button("Cut") # Button to start the cutting process
|
| 52 |
],
|
| 53 |
outputs=gr.Video(label="Output Dumpscare Video"),
|
| 54 |
title="Dumpscare Video Converter",
|
| 55 |
description="Upload a video, set sensitivity, and click 'Cut' to process the video.",
|
|
|
|
| 56 |
)
|
| 57 |
|
| 58 |
iface.launch()
|