Spaces:
Running
Running
Commit
·
9d420b8
1
Parent(s):
4a3d698
init
Browse files
app.py
CHANGED
@@ -40,6 +40,7 @@ def generate_safe_filename_part(text, max_len=20):
|
|
40 |
safe_text = "_".join(safe_text.split()) # Replace spaces with underscores
|
41 |
return safe_text[:max_len]
|
42 |
|
|
|
43 |
def run_video_edit(source_video_path, source_prompt, target_prompt, source_words, target_words,
|
44 |
omega_value, n_max_value, n_avg_value, progress=gr.Progress(track_tqdm=True)):
|
45 |
if not source_video_path:
|
@@ -198,6 +199,7 @@ if not examples_data:
|
|
198 |
print(f"Warning: No example videos found in '{VIDEO_EXAMPLES_DIR}'. Examples section will be empty or not show.")
|
199 |
|
200 |
|
|
|
201 |
with gr.Blocks(theme=gr.themes.Soft(), css="""
|
202 |
/* Main container - maximize width and improve spacing */
|
203 |
.gradio-container {
|
@@ -369,6 +371,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css="""
|
|
369 |
n_avg_slider
|
370 |
]
|
371 |
|
|
|
372 |
submit_button.click(
|
373 |
fn=run_video_edit,
|
374 |
inputs=all_process_inputs,
|
|
|
40 |
safe_text = "_".join(safe_text.split()) # Replace spaces with underscores
|
41 |
return safe_text[:max_len]
|
42 |
|
43 |
+
@spaces.GPU
|
44 |
def run_video_edit(source_video_path, source_prompt, target_prompt, source_words, target_words,
|
45 |
omega_value, n_max_value, n_avg_value, progress=gr.Progress(track_tqdm=True)):
|
46 |
if not source_video_path:
|
|
|
199 |
print(f"Warning: No example videos found in '{VIDEO_EXAMPLES_DIR}'. Examples section will be empty or not show.")
|
200 |
|
201 |
|
202 |
+
|
203 |
with gr.Blocks(theme=gr.themes.Soft(), css="""
|
204 |
/* Main container - maximize width and improve spacing */
|
205 |
.gradio-container {
|
|
|
371 |
n_avg_slider
|
372 |
]
|
373 |
|
374 |
+
|
375 |
submit_button.click(
|
376 |
fn=run_video_edit,
|
377 |
inputs=all_process_inputs,
|