Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -235,8 +235,10 @@ def get_duration(
|
|
| 235 |
):
|
| 236 |
if duration <= 5:
|
| 237 |
return 80
|
| 238 |
-
|
| 239 |
return 120
|
|
|
|
|
|
|
| 240 |
|
| 241 |
class RadioAnimated(gr.HTML):
|
| 242 |
"""
|
|
@@ -636,7 +638,7 @@ with gr.Blocks(title="LTX-2 Video Distilled 🎥🔈") as demo:
|
|
| 636 |
|
| 637 |
with gr.Column():
|
| 638 |
radioanimated_duration = RadioAnimated(
|
| 639 |
-
choices=["3s", "5s", "10s"],
|
| 640 |
value="3s",
|
| 641 |
elem_id="radioanimated_duration"
|
| 642 |
)
|
|
@@ -644,7 +646,7 @@ with gr.Blocks(title="LTX-2 Video Distilled 🎥🔈") as demo:
|
|
| 644 |
duration = gr.Slider(
|
| 645 |
label="Duration (seconds)",
|
| 646 |
minimum=1.0,
|
| 647 |
-
maximum=
|
| 648 |
value=3.0,
|
| 649 |
step=0.1,
|
| 650 |
visible=False
|
|
|
|
| 235 |
):
|
| 236 |
if duration <= 5:
|
| 237 |
return 80
|
| 238 |
+
elif duration <= 10:
|
| 239 |
return 120
|
| 240 |
+
else:
|
| 241 |
+
return 180
|
| 242 |
|
| 243 |
class RadioAnimated(gr.HTML):
|
| 244 |
"""
|
|
|
|
| 638 |
|
| 639 |
with gr.Column():
|
| 640 |
radioanimated_duration = RadioAnimated(
|
| 641 |
+
choices=["3s", "5s", "10s", "15s"],
|
| 642 |
value="3s",
|
| 643 |
elem_id="radioanimated_duration"
|
| 644 |
)
|
|
|
|
| 646 |
duration = gr.Slider(
|
| 647 |
label="Duration (seconds)",
|
| 648 |
minimum=1.0,
|
| 649 |
+
maximum=15.0,
|
| 650 |
value=3.0,
|
| 651 |
step=0.1,
|
| 652 |
visible=False
|