File size: 786 Bytes
1394dfd
d18b950
1394dfd
 
8dc0a71
1394dfd
 
545a7e1
 
8dc0a71
545a7e1
8dc0a71
545a7e1
 
1394dfd
8dc0a71
545a7e1
 
 
8dc0a71
545a7e1
 
8dc0a71
 
 
 
545a7e1
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
import streamlit as st
from Face_Censoring 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)