evelynsaltt commited on
Commit
b0fe31d
·
verified ·
1 Parent(s): b87aec8

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +24 -24
src/streamlit_app.py CHANGED
@@ -1,22 +1,22 @@
1
  import streamlit as st
2
  import os
3
 
4
- # Video folder path
5
  VIDEO_FOLDER = "./src/synthda_falling_realreal/"
6
 
7
- # Streamlit page setup
8
  st.set_page_config(layout="wide")
9
  st.title("AutoSynthDa Pose Interpolation Viewer")
10
 
11
  st.markdown("""
12
  ### AutoSynthDa Interpolation Viewer
13
 
14
- AutoSynthDa blends two input motion videos to **generate kinematically coherent, synthetic action videos**.
15
  Use the slider below to explore how the system interpolates motion from one video to another.
16
  Source: [github.com/nvidia/synthda](https://github.com/nvidia/synthda)
17
  """)
18
 
19
- # Slider explanation
20
  st.markdown(
21
  '<p style="text-align:center;"><strong>Use the slider to control the interpolation between Input Video 1 (left) and Input Video 2 (right).</strong></p>',
22
  unsafe_allow_html=True
@@ -54,24 +54,24 @@ else:
54
  # Layout: 3 columns for videos
55
  col1, col2, col3 = st.columns(3)
56
 
57
- # Helper to show video with autoplay
58
- def render_video_column(col, label, video_path, exists):
59
- with col:
60
- st.markdown(f"<div style='text-align: center; font-weight: bold;'>{label}</div>", unsafe_allow_html=True)
61
- if exists:
62
- st.markdown(
63
- f"""
64
- <video width="100%" autoplay loop muted playsinline>
65
- <source src="{video_path}" type="video/mp4">
66
- Your browser does not support the video tag.
67
- </video>
68
- """,
69
- unsafe_allow_html=True
70
- )
71
- else:
72
- st.error(f"{label} not found")
73
 
74
- # Show videos
75
- render_video_column(col1, "Input Video 1", video_input1, exists_1)
76
- render_video_column(col2, "Interpolated Video", video_interp, exists_interp)
77
- render_video_column(col3, "Input Video 2", video_input2, exists_2)
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
  import os
3
 
4
+ # Video directory
5
  VIDEO_FOLDER = "./src/synthda_falling_realreal/"
6
 
7
+ # Set page layout
8
  st.set_page_config(layout="wide")
9
  st.title("AutoSynthDa Pose Interpolation Viewer")
10
 
11
  st.markdown("""
12
  ### AutoSynthDa Interpolation Viewer
13
 
14
+ AutoSynthDa blends two input motion videos to **generate kinematically coherent, synthetic action videos**.
15
  Use the slider below to explore how the system interpolates motion from one video to another.
16
  Source: [github.com/nvidia/synthda](https://github.com/nvidia/synthda)
17
  """)
18
 
19
+ # Slider instruction
20
  st.markdown(
21
  '<p style="text-align:center;"><strong>Use the slider to control the interpolation between Input Video 1 (left) and Input Video 2 (right).</strong></p>',
22
  unsafe_allow_html=True
 
54
  # Layout: 3 columns for videos
55
  col1, col2, col3 = st.columns(3)
56
 
57
+ # Centered labels and video playback
58
+ with col1:
59
+ st.markdown("<div style='text-align: center; font-weight: bold;'>Input Video 1</div>", unsafe_allow_html=True)
60
+ if exists_1:
61
+ st.video(video_input1)
62
+ else:
63
+ st.error("Video 1 not found")
 
 
 
 
 
 
 
 
 
64
 
65
+ with col2:
66
+ st.markdown("<div style='text-align: center; font-weight: bold;'>Interpolated Video</div>", unsafe_allow_html=True)
67
+ if exists_interp:
68
+ st.video(video_interp)
69
+ else:
70
+ st.error("Interpolated video not found")
71
+
72
+ with col3:
73
+ st.markdown("<div style='text-align: center; font-weight: bold;'>Input Video 2</div>", unsafe_allow_html=True)
74
+ if exists_2:
75
+ st.video(video_input2)
76
+ else:
77
+ st.error("Video 2 not found")