aashwinik commited on
Commit
545a7e1
1 Parent(s): 1394dfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -5
app.py CHANGED
@@ -4,9 +4,20 @@ import streamlit as st
4
  st.set_page_config(page_title="Python - Face Censoring", page_icon=":robot:")
5
  st.header("Python - Face Censoring")
6
 
7
- submit=st.button('See Myself')
8
- if submit:
9
- picture = st.camera_input("Take a picture")
 
 
 
 
 
10
 
11
- if picture:
12
- st.image(picture)
 
 
 
 
 
 
 
4
  st.set_page_config(page_title="Python - Face Censoring", page_icon=":robot:")
5
  st.header("Python - Face Censoring")
6
 
7
+ uploaded_file = st.file_uploader("Choose a video (only with 'mp4' extension): ", accept_multiple_files=False, type=['mp4'])
8
+ if uploaded_file is not None:
9
+ #call python function
10
+
11
+ video_file = open('myvideo.mp4', 'rb')
12
+ video_bytes = video_file.read()
13
+
14
+ st.video(video_bytes)
15
 
16
+ with open("censored_myvideo.mp4", "rb") as file:
17
+ btn = st.download_button(
18
+ label="Download video",
19
+ data=file,
20
+ file_name="myvideo.mp4",
21
+ mime="video/mp4"
22
+ )
23
+