FarhanAK128 commited on
Commit
14eccb0
·
verified ·
1 Parent(s): fb28eda

Update frontend.py

Browse files
Files changed (1) hide show
  1. 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.makedirs("tmp", exist_ok=True)
167
- gif_filename = f"tmp/animation_{uuid.uuid4().hex}.gif"
 
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