File size: 1,109 Bytes
4ba17b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
706f673
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import altair as alt
import numpy as np
import pandas as pd
import streamlit as st

"""
# Welcome to Streamlit!

Edit `/streamlit_app.py` to customize this app to your heart's desire :heart:.
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
forums](https://discuss.streamlit.io).

In the meantime, below is an example of what you can do with just a few lines of code:
"""


# Set your video directory here
VIDEO_FOLDER = "synthda_fallingdemo_realreal"

st.set_page_config(layout="centered")
st.title("AutoSynthDa Pose Interpolation Viewer")

st.markdown("Use the slider to explore how pose interpolation changes as the weight increases.")

# Slider for selecting weight
weight = st.slider("Interpolation Weight", 0.0, 1.0, step=0.1)

# Construct filename based on weight (rounded to one decimal for file matching)
filename = f"videos_generated_{weight:.1f}.mp4"
video_path = os.path.join(VIDEO_FOLDER, filename)

# Check if the video exists
if os.path.exists(video_path):
    st.video(video_path)
else:
    st.error(f"No video found for weight = {weight:.1f}")