aashwinik's picture
Update app.py
545a7e1 verified
raw
history blame
663 Bytes
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"
)