Spaces:
Build error
Build error
File size: 2,388 Bytes
4ba17b3 9c02460 4ba17b3 706f673 2bb13f8 706f673 641ce46 4c72af5 641ce46 4c72af5 641ce46 706f673 4c72af5 2717354 4c72af5 2717354 4c72af5 2717354 4c72af5 706f673 4c72af5 2717354 4c72af5 b3a0c58 4c72af5 b3a0c58 4c72af5 b3a0c58 641ce46 4c72af5 2717354 706f673 4c72af5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
import streamlit as st
import os
# Set your video directory here
VIDEO_FOLDER = "./src/synthda_falling_realreal/"
st.set_page_config(layout="centered")
st.title("AutoSynthDa Pose Interpolation Viewer")
st.markdown("""
# AutoSynthDa Interpolation Viewer
AutoSynthDa blends two input motion videos to **generate kinematically coherent, synthetic action videos**.
Use the slider to view interpolated motion between two real motion capture inputs.
View the code at: [github.com/nvidia/synthda](https://github.com/nvidia/synthda)
""")
# Custom styles for centering
st.markdown("""
<style>
.centered-text {
text-align: center;
font-size: 18px;
font-weight: 500;
margin-top: 1em;
margin-bottom: 1em;
}
.slider-label {
text-align: center;
font-size: 16px;
color: gray;
margin-bottom: 10px;
}
video {
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
</style>
""", unsafe_allow_html=True)
# Slider label
st.markdown('<p class="slider-label">Slide to interpolate between Input Video 1 (left) and Input Video 2 (right)</p>', unsafe_allow_html=True)
# Slider
weight = st.slider("Interpolation Weight", 0.0, 1.0, step=0.1)
# Calculate filenames
filename_interp = f"videos_generated_{weight:.1f}.mp4"
video_interp = os.path.join(VIDEO_FOLDER, filename_interp)
video_input1 = os.path.join(VIDEO_FOLDER, "videos_generated_0.0.mp4")
video_input2 = os.path.join(VIDEO_FOLDER, "videos_generated_1.0.mp4")
# Display interpolation description
if weight == 0.0:
interp_text = "Showing Input Video 1 (Original)"
elif weight == 1.0:
interp_text = "Showing Input Video 2 (Original)"
else:
w2 = round(1.0 - weight, 1)
interp_text = f"Interpolated Video: {weight:.1f} from Input 1 + {w2:.1f} from Input 2"
st.markdown(f'<div class="centered-text">{interp_text}</div>', unsafe_allow_html=True)
# Check files
exists_1 = os.path.exists(video_input1)
exists_interp = os.path.exists(video_interp)
exists_2 = os.path.exists(video_input2)
# Display videos side by side using columns
col1, col2, col3 = st.columns(3)
with col1:
st.markdown("**Input Video 1**", unsafe_allow_html=True)
if exists_1:
st.markdown(f"""
<video autoplay loop muted playsinline width="100%">
<source src="{video_input1}" type="video/mp4">
</video>""", unsafe_allow_html=True)
else:
st.error("Video 1 not fo
|