File size: 439 Bytes
e7ad5fd 94c1be6 e7ad5fd 94c1be6 de98af4 94c1be6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import streamlit as st
import tempfile
HF_TMP = tempfile.mkdtemp()
uploaded_video = st.file_uploader("📹 Upload video file", type=["mp4", "mov"])
if uploaded_video is not None:
with tempfile.NamedTemporaryFile(delete=False, suffix=".mp4", dir=HF_TMP) as tmp_file:
tmp_file.write(uploaded_video.read())
input_video_path = tmp_file.name
st.video(input_video_path)
st.success("✅ Video uploaded and saved.")
|