Spaces:
Running
Running
further testing
Browse files- src/streamlit_app.py +24 -10
src/streamlit_app.py
CHANGED
|
@@ -4,20 +4,34 @@ import os
|
|
| 4 |
# Video directory
|
| 5 |
VIDEO_FOLDER = "./src/synthda_falling_realreal/"
|
| 6 |
|
|
|
|
| 7 |
st.set_page_config(layout="centered")
|
| 8 |
-
st.title("AutoSynthDa Pose Interpolation Viewer")
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
filename = f"videos_generated_{weight:.1f}.mp4"
|
| 17 |
video_path = os.path.join(VIDEO_FOLDER, filename)
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
| 4 |
# Video directory
|
| 5 |
VIDEO_FOLDER = "./src/synthda_falling_realreal/"
|
| 6 |
|
| 7 |
+
# Set page layout
|
| 8 |
st.set_page_config(layout="centered")
|
|
|
|
| 9 |
|
| 10 |
+
# Centered title
|
| 11 |
+
st.markdown(
|
| 12 |
+
"<h1 style='text-align: center;'>AutoSynthDa Pose Interpolation Viewer</h1>",
|
| 13 |
+
unsafe_allow_html=True
|
| 14 |
+
)
|
| 15 |
|
| 16 |
+
# Centered description
|
| 17 |
+
st.markdown(
|
| 18 |
+
"<p style='text-align: center;'>Use the slider to explore how pose interpolation changes as the weight increases.</p>",
|
| 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}")
|