Update app.py
Browse files
app.py
CHANGED
|
@@ -223,6 +223,9 @@ def process_video(video_path, target_img, transition_level, resolution, landmark
|
|
| 223 |
"""
|
| 224 |
Callback function that now receives resolution and landmark settings from the UI.
|
| 225 |
"""
|
|
|
|
|
|
|
|
|
|
| 226 |
if video_path is None or target_img is None:
|
| 227 |
# Create a dummy video to avoid Gradio errors on empty inputs
|
| 228 |
dummy_path = tempfile.NamedTemporaryFile(delete=False, suffix=".mp4").name
|
|
|
|
| 223 |
"""
|
| 224 |
Callback function that now receives resolution and landmark settings from the UI.
|
| 225 |
"""
|
| 226 |
+
|
| 227 |
+
target_img = cv2.cvtColor(target_img, cv2.COLOR_RGB2BGR)
|
| 228 |
+
|
| 229 |
if video_path is None or target_img is None:
|
| 230 |
# Create a dummy video to avoid Gradio errors on empty inputs
|
| 231 |
dummy_path = tempfile.NamedTemporaryFile(delete=False, suffix=".mp4").name
|