Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def process_frame(frame, bg_type, bg, fast_mode, bg_frame_index, background_fram
|
|
50 |
return frame, bg_frame_index
|
51 |
|
52 |
@spaces.GPU
|
53 |
-
def fn(vid, bg_type="Color", bg_image=None, bg_video=None, color="#00FF00", fps=0, video_handling="slow_down", fast_mode=True, max_workers=
|
54 |
try:
|
55 |
start_time = time.time() # Start the timer
|
56 |
video = VideoFileClip(vid)
|
@@ -152,7 +152,7 @@ with gr.Blocks(theme=gr.themes.Ocean()) as demo:
|
|
152 |
video_handling_radio = gr.Radio(["slow_down", "loop"], label="Video Handling", value="slow_down", interactive=True)
|
153 |
|
154 |
fast_mode_checkbox = gr.Checkbox(label="Fast Mode (Use BiRefNet_lite)", value=True, interactive=True)
|
155 |
-
max_workers_slider = gr.Slider( minimum=1, maximum=32, step=1, value=
|
156 |
|
157 |
time_textbox = gr.Textbox(label="Time Elapsed", interactive=False)
|
158 |
|
|
|
50 |
return frame, bg_frame_index
|
51 |
|
52 |
@spaces.GPU
|
53 |
+
def fn(vid, bg_type="Color", bg_image=None, bg_video=None, color="#00FF00", fps=0, video_handling="slow_down", fast_mode=True, max_workers=10):
|
54 |
try:
|
55 |
start_time = time.time() # Start the timer
|
56 |
video = VideoFileClip(vid)
|
|
|
152 |
video_handling_radio = gr.Radio(["slow_down", "loop"], label="Video Handling", value="slow_down", interactive=True)
|
153 |
|
154 |
fast_mode_checkbox = gr.Checkbox(label="Fast Mode (Use BiRefNet_lite)", value=True, interactive=True)
|
155 |
+
max_workers_slider = gr.Slider( minimum=1, maximum=32, step=1, value=10, label="Max Workers", info="Determines how many frames to process in parallel", interactive=True )
|
156 |
|
157 |
time_textbox = gr.Textbox(label="Time Elapsed", interactive=False)
|
158 |
|