Update app.py
Browse files
app.py
CHANGED
@@ -8,9 +8,10 @@ st.markdown("Upload a video or select the example")
|
|
8 |
|
9 |
## Select video to inference
|
10 |
f = st.file_uploader(" Upload a video ", type=["mp4"])
|
11 |
-
|
12 |
-
tfile.
|
13 |
-
|
|
|
14 |
|
15 |
if st.button("example"):
|
16 |
file_video = "test_video.mp4"
|
|
|
8 |
|
9 |
## Select video to inference
|
10 |
f = st.file_uploader(" Upload a video ", type=["mp4"])
|
11 |
+
if f is not None:
|
12 |
+
tfile = tempfile.NamedTemporaryFile(delete=False)
|
13 |
+
tfile.write(f.read())
|
14 |
+
file_video = tfile.name
|
15 |
|
16 |
if st.button("example"):
|
17 |
file_video = "test_video.mp4"
|