evelynsaltt commited on
Commit
0d12680
·
verified ·
1 Parent(s): 247c098

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +11 -12
src/streamlit_app.py CHANGED
@@ -19,19 +19,18 @@ st.markdown(
19
  unsafe_allow_html=True
20
  )
21
 
22
- # Centered slider using columns
23
- col1, col2, col3 = st.columns([1, 2, 1])
24
- with col2:
25
- weight = st.slider("Interpolation Weight", 0.0, 1.0, step=0.1)
26
 
27
- # Video filename
28
  filename = f"videos_generated_{weight:.1f}.mp4"
29
  video_path = os.path.join(VIDEO_FOLDER, filename)
30
 
31
- # Centered video display
32
- col1, col2, col3 = st.columns([1, 2, 1])
33
- with col2:
34
- if os.path.exists(video_path):
35
- st.video(f"{VIDEO_FOLDER}/{filename}")
36
- else:
37
- st.error(f"No video found for weight = {weight:.1f}")
 
 
19
  unsafe_allow_html=True
20
  )
21
 
22
+ # Slider
23
+ weight = st.slider("Interpolation Weight", 0.0, 1.0, step=0.1)
 
 
24
 
25
+ # Video path
26
  filename = f"videos_generated_{weight:.1f}.mp4"
27
  video_path = os.path.join(VIDEO_FOLDER, filename)
28
 
29
+ # Display video or error
30
+ if os.path.exists(video_path):
31
+ st.video(video_path)
32
+ else:
33
+ st.markdown(
34
+ f"<p style='text-align: center; color: red;'>No video found for weight = {weight:.1f}</p>",
35
+ unsafe_allow_html=True
36
+ )