Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1532,7 +1532,7 @@ def apply_duration(duration: str):
|
|
| 1532 |
def on_mode_change(selected: str):
|
| 1533 |
is_motion = False # Removed Motion Control
|
| 1534 |
# Updated logic for Persian string
|
| 1535 |
-
is_interpolate = (selected == "
|
| 1536 |
|
| 1537 |
return (gr.update(visible=is_motion), gr.update(visible=is_interpolate))
|
| 1538 |
|
|
@@ -2453,7 +2453,7 @@ def enhance_prompt_on_cpu(image_path: str, prompt: str, mode: str):
|
|
| 2453 |
"""
|
| 2454 |
این تابع روی CPU اجرا میشود و هیچ سهمیهای از GPU کم نمیکند.
|
| 2455 |
"""
|
| 2456 |
-
if mode not in ['تبدیل تصویر به ویدیو', '
|
| 2457 |
return prompt
|
| 2458 |
|
| 2459 |
print("Running prompt enhancement on CPU...")
|
|
|
|
| 1532 |
def on_mode_change(selected: str):
|
| 1533 |
is_motion = False # Removed Motion Control
|
| 1534 |
# Updated logic for Persian string
|
| 1535 |
+
is_interpolate = (selected == "ویدیو با دو تصویر")
|
| 1536 |
|
| 1537 |
return (gr.update(visible=is_motion), gr.update(visible=is_interpolate))
|
| 1538 |
|
|
|
|
| 2453 |
"""
|
| 2454 |
این تابع روی CPU اجرا میشود و هیچ سهمیهای از GPU کم نمیکند.
|
| 2455 |
"""
|
| 2456 |
+
if mode not in ['تبدیل تصویر به ویدیو', 'ویدیو با دو تصویر'] or not image_path:
|
| 2457 |
return prompt
|
| 2458 |
|
| 2459 |
print("Running prompt enhancement on CPU...")
|