Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -112,6 +112,7 @@ def generate_video(
|
|
| 112 |
input_image,
|
| 113 |
prompt: str,
|
| 114 |
duration: float,
|
|
|
|
| 115 |
seed: int = 42,
|
| 116 |
randomize_seed: bool = True,
|
| 117 |
height: int = DEFAULT_HEIGHT,
|
|
@@ -164,7 +165,7 @@ def generate_video(
|
|
| 164 |
|
| 165 |
result = text_encoder_client.predict(
|
| 166 |
prompt=prompt,
|
| 167 |
-
enhance_prompt=
|
| 168 |
input_image=image_input,
|
| 169 |
seed=current_seed,
|
| 170 |
api_name="/encode_prompt"
|
|
@@ -225,14 +226,18 @@ with gr.Blocks(title="LTX-2 Video Distilled 🎥🔈") as demo:
|
|
| 225 |
lines=3,
|
| 226 |
placeholder="Describe the motion and animation you want..."
|
| 227 |
)
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
|
| 237 |
generate_btn = gr.Button("Generate Video", variant="primary", size="lg")
|
| 238 |
|
|
@@ -271,6 +276,7 @@ with gr.Blocks(title="LTX-2 Video Distilled 🎥🔈") as demo:
|
|
| 271 |
input_image,
|
| 272 |
prompt,
|
| 273 |
duration,
|
|
|
|
| 274 |
seed,
|
| 275 |
randomize_seed,
|
| 276 |
height,
|
|
@@ -307,4 +313,4 @@ css = '''
|
|
| 307 |
.gradio-container .contain{max-width: 1200px !important; margin: 0 auto !important}
|
| 308 |
'''
|
| 309 |
if __name__ == "__main__":
|
| 310 |
-
demo.launch(theme=gr.themes.Citrus(), css=css
|
|
|
|
| 112 |
input_image,
|
| 113 |
prompt: str,
|
| 114 |
duration: float,
|
| 115 |
+
enhance_prompt: bool = True,
|
| 116 |
seed: int = 42,
|
| 117 |
randomize_seed: bool = True,
|
| 118 |
height: int = DEFAULT_HEIGHT,
|
|
|
|
| 165 |
|
| 166 |
result = text_encoder_client.predict(
|
| 167 |
prompt=prompt,
|
| 168 |
+
enhance_prompt=enhance_prompt,
|
| 169 |
input_image=image_input,
|
| 170 |
seed=current_seed,
|
| 171 |
api_name="/encode_prompt"
|
|
|
|
| 226 |
lines=3,
|
| 227 |
placeholder="Describe the motion and animation you want..."
|
| 228 |
)
|
| 229 |
+
with gr.Row():
|
| 230 |
+
duration = gr.Slider(
|
| 231 |
+
label="Duration (seconds)",
|
| 232 |
+
minimum=1.0,
|
| 233 |
+
maximum=10.0,
|
| 234 |
+
value=3.0,
|
| 235 |
+
step=0.1
|
| 236 |
+
)
|
| 237 |
+
enhance_prompt = gr.Checkbox(
|
| 238 |
+
label="Enhance Prompt",
|
| 239 |
+
value=True
|
| 240 |
+
)
|
| 241 |
|
| 242 |
generate_btn = gr.Button("Generate Video", variant="primary", size="lg")
|
| 243 |
|
|
|
|
| 276 |
input_image,
|
| 277 |
prompt,
|
| 278 |
duration,
|
| 279 |
+
enhance_prompt,
|
| 280 |
seed,
|
| 281 |
randomize_seed,
|
| 282 |
height,
|
|
|
|
| 313 |
.gradio-container .contain{max-width: 1200px !important; margin: 0 auto !important}
|
| 314 |
'''
|
| 315 |
if __name__ == "__main__":
|
| 316 |
+
demo.launch(theme=gr.themes.Citrus(), css=css)
|