Spaces:
Sleeping
Sleeping
File size: 663 Bytes
1394dfd 545a7e1 1394dfd 545a7e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
#UIApp starts here
st.set_page_config(page_title="Python - Face Censoring", page_icon=":robot:")
st.header("Python - Face Censoring")
uploaded_file = st.file_uploader("Choose a video (only with 'mp4' extension): ", accept_multiple_files=False, type=['mp4'])
if uploaded_file is not None:
#call python function
video_file = open('myvideo.mp4', 'rb')
video_bytes = video_file.read()
st.video(video_bytes)
with open("censored_myvideo.mp4", "rb") as file:
btn = st.download_button(
label="Download video",
data=file,
file_name="myvideo.mp4",
mime="video/mp4"
)
|