aashwinik's picture
Update app.py
8dc0a71 verified
raw history blame
No virus
785 Bytes
import streamlit as st
from FaceCensoring import censor_face
#UIApp starts here
st.set_page_config(page_title="Python - Face Censoring", page_icon=":face_in_clouds:")
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:
output=censor_face(uploaded_file)
video_file = open(uploaded_file, 'rb')
video_bytes = video_file.read()
st.video(video_bytes)
with open(output, "rb") as file:
btn = st.download_button(
label="Download video",
data=file,
file_name=output,
mime="video/mp4"
)
video_file = open(output, 'rb')
video_bytes = video_file.read()
st.video(video_bytes)