Spaces:
Running
on
Zero
Running
on
Zero
Make Enhance Prompt an option
Browse files
app.py
CHANGED
|
@@ -64,6 +64,7 @@ def process_video(
|
|
| 64 |
video_path,
|
| 65 |
prompt,
|
| 66 |
negative_prompt="",
|
|
|
|
| 67 |
num_frames=81,
|
| 68 |
auto_resize=True,
|
| 69 |
manual_height=480,
|
|
@@ -73,6 +74,10 @@ def process_video(
|
|
| 73 |
):
|
| 74 |
# Load and preprocess video
|
| 75 |
progress(0.2, desc="Loading video...")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
# Get video dimensions
|
| 78 |
temp_video = load_video(video_path)
|
|
@@ -154,6 +159,8 @@ with gr.Blocks(title="Lucy Edit - Video Editing with Text", css=css) as demo:
|
|
| 154 |
)
|
| 155 |
|
| 156 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
|
|
|
|
| 157 |
negative_prompt = gr.Textbox(
|
| 158 |
label="Negative Prompt (optional)",
|
| 159 |
placeholder="Describe what you DON'T want in the video...",
|
|
@@ -223,6 +230,7 @@ with gr.Blocks(title="Lucy Edit - Video Editing with Text", css=css) as demo:
|
|
| 223 |
video_input,
|
| 224 |
prompt,
|
| 225 |
negative_prompt,
|
|
|
|
| 226 |
num_frames,
|
| 227 |
auto_resize,
|
| 228 |
manual_height,
|
|
|
|
| 64 |
video_path,
|
| 65 |
prompt,
|
| 66 |
negative_prompt="",
|
| 67 |
+
enhance_prompt=True,
|
| 68 |
num_frames=81,
|
| 69 |
auto_resize=True,
|
| 70 |
manual_height=480,
|
|
|
|
| 74 |
):
|
| 75 |
# Load and preprocess video
|
| 76 |
progress(0.2, desc="Loading video...")
|
| 77 |
+
|
| 78 |
+
if(enhance_prompt):
|
| 79 |
+
#add here the prompt enhancement API call
|
| 80 |
+
pass
|
| 81 |
|
| 82 |
# Get video dimensions
|
| 83 |
temp_video = load_video(video_path)
|
|
|
|
| 159 |
)
|
| 160 |
|
| 161 |
with gr.Accordion("Advanced Settings", open=False):
|
| 162 |
+
enhance_prompt = gr.Checkbox("Enhance Prompt")
|
| 163 |
+
|
| 164 |
negative_prompt = gr.Textbox(
|
| 165 |
label="Negative Prompt (optional)",
|
| 166 |
placeholder="Describe what you DON'T want in the video...",
|
|
|
|
| 230 |
video_input,
|
| 231 |
prompt,
|
| 232 |
negative_prompt,
|
| 233 |
+
enhance_prompt,
|
| 234 |
num_frames,
|
| 235 |
auto_resize,
|
| 236 |
manual_height,
|