NassimeBejaia commited on
Commit
bf3e5b9
1 Parent(s): 8106f16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -88,8 +88,8 @@ def prediction(vname):
88
  if os.path.exists(wpath):
89
  with st.spinner('Running detection...'):
90
  os.system("python test_detection/track.py --yolo_weights test_detection/yolov5/weights/crowdhuman_yolov5m.pt --img 352 --save-vid --save-txt --classes 1 --conf-thres 0.4 --source " + vpath)
91
- os.system("ffmpeg -i inference/output/"+vname + " -vcodec libx264 -y inference/output/output_video.mp4")
92
- path = 'inference/output/output_video.mp4'
93
  if os.path.exists(path):
94
  video_file = open(path, 'rb')
95
  video_bytes = video_file.read()
 
88
  if os.path.exists(wpath):
89
  with st.spinner('Running detection...'):
90
  os.system("python test_detection/track.py --yolo_weights test_detection/yolov5/weights/crowdhuman_yolov5m.pt --img 352 --save-vid --save-txt --classes 1 --conf-thres 0.4 --source " + vpath)
91
+ os.system("ffmpeg -i inference/output/"+vname + " -vcodec libx264 -y inference/output/output_"+vname)
92
+ path = 'inference/output/output_'+vname
93
  if os.path.exists(path):
94
  video_file = open(path, 'rb')
95
  video_bytes = video_file.read()