Spaces:
Runtime error
Runtime error
Update frontend.py
Browse files- frontend.py +3 -2
frontend.py
CHANGED
|
@@ -163,8 +163,9 @@ if options and selected_video:
|
|
| 163 |
with st.spinner('🔄 Loading and processing video...'):
|
| 164 |
gif_frames = load_video_for_gif(file_path)
|
| 165 |
alignment = load_alignments(file_path.replace('.mpg','.align'))
|
| 166 |
-
os.
|
| 167 |
-
|
|
|
|
| 168 |
imageio.mimsave(gif_filename, gif_frames, fps=15, loop=0)
|
| 169 |
|
| 170 |
# Display video
|
|
|
|
| 163 |
with st.spinner('🔄 Loading and processing video...'):
|
| 164 |
gif_frames = load_video_for_gif(file_path)
|
| 165 |
alignment = load_alignments(file_path.replace('.mpg','.align'))
|
| 166 |
+
temp_dir = os.path.join(os.getcwd(), "tmp")
|
| 167 |
+
os.makedirs(temp_dir, exist_ok=True)
|
| 168 |
+
gif_filename = os.path.join(temp_dir, f"animation_{uuid.uuid4().hex}.gif")
|
| 169 |
imageio.mimsave(gif_filename, gif_frames, fps=15, loop=0)
|
| 170 |
|
| 171 |
# Display video
|