alexrods commited on
Commit
ed302d0
·
1 Parent(s): 7885d83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- tfile = tempfile.NamedTemporaryFile(delete=False)
12
- tfile.write(f.read())
13
- file_video = tfile.name
 
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"