synthda-demo / src /streamlit_app.py
evelynsaltt's picture
further testing
247c098 verified
raw
history blame
990 Bytes
import streamlit as st
import os
# Video directory
VIDEO_FOLDER = "./src/synthda_falling_realreal/"
# Set page layout
st.set_page_config(layout="centered")
# Centered title
st.markdown(
"<h1 style='text-align: center;'>AutoSynthDa Pose Interpolation Viewer</h1>",
unsafe_allow_html=True
)
# Centered description
st.markdown(
"<p style='text-align: center;'>Use the slider to explore how pose interpolation changes as the weight increases.</p>",
unsafe_allow_html=True
)
# Centered slider using columns
col1, col2, col3 = st.columns([1, 2, 1])
with col2:
weight = st.slider("Interpolation Weight", 0.0, 1.0, step=0.1)
# Video filename
filename = f"videos_generated_{weight:.1f}.mp4"
video_path = os.path.join(VIDEO_FOLDER, filename)
# Centered video display
col1, col2, col3 = st.columns([1, 2, 1])
with col2:
if os.path.exists(video_path):
st.video(f"{VIDEO_FOLDER}/{filename}")
else:
st.error(f"No video found for weight = {weight:.1f}")