Update app.py
Browse files
app.py
CHANGED
|
@@ -5,11 +5,6 @@ import os
|
|
| 5 |
import cv2
|
| 6 |
import random
|
| 7 |
|
| 8 |
-
|
| 9 |
-
os.system("mkdir /tmp/_input")
|
| 10 |
-
os.system("mkdir /tmp/_output")
|
| 11 |
-
os.system("mkdir /tmp/_outputf")
|
| 12 |
-
os.system("mkdir /tmp/videoSaida")
|
| 13 |
os.system("ls")
|
| 14 |
col1, col2 = st.columns(2)
|
| 15 |
|
|
@@ -26,6 +21,11 @@ if uploaded_file is not None:
|
|
| 26 |
# To read file as bytes:
|
| 27 |
bytes_data = uploaded_file.getvalue()
|
| 28 |
st.video(bytes_data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
with open("/tmp/inputvideo", "wb") as binary_file:
|
| 30 |
binary_file.write(bytes_data)
|
| 31 |
vcap = cv2.VideoCapture('/tmp/inputvideo') # 0=camera
|
|
@@ -41,6 +41,8 @@ if uploaded_file is not None:
|
|
| 41 |
st.write(str(fps)+" fps")
|
| 42 |
@st.experimental_memo(suppress_st_warning=True)
|
| 43 |
def chamada():
|
|
|
|
|
|
|
| 44 |
percent_complete=0
|
| 45 |
my_bar = st.progress(0)
|
| 46 |
percent_complete= percent_complete+ 10
|
|
|
|
| 5 |
import cv2
|
| 6 |
import random
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
os.system("ls")
|
| 9 |
col1, col2 = st.columns(2)
|
| 10 |
|
|
|
|
| 21 |
# To read file as bytes:
|
| 22 |
bytes_data = uploaded_file.getvalue()
|
| 23 |
st.video(bytes_data)
|
| 24 |
+
os.system("rm -R /tmp/*")
|
| 25 |
+
os.system("mkdir /tmp/_input")
|
| 26 |
+
os.system("mkdir /tmp/_output")
|
| 27 |
+
os.system("mkdir /tmp/_outputf")
|
| 28 |
+
os.system("mkdir /tmp/videoSaida")
|
| 29 |
with open("/tmp/inputvideo", "wb") as binary_file:
|
| 30 |
binary_file.write(bytes_data)
|
| 31 |
vcap = cv2.VideoCapture('/tmp/inputvideo') # 0=camera
|
|
|
|
| 41 |
st.write(str(fps)+" fps")
|
| 42 |
@st.experimental_memo(suppress_st_warning=True)
|
| 43 |
def chamada():
|
| 44 |
+
|
| 45 |
+
|
| 46 |
percent_complete=0
|
| 47 |
my_bar = st.progress(0)
|
| 48 |
percent_complete= percent_complete+ 10
|