Spaces:
Sleeping
Sleeping
Commit ·
25981df
1
Parent(s): b2d6b78
Change to cpu
Browse files
app.py
CHANGED
|
@@ -68,10 +68,10 @@ def main():
|
|
| 68 |
|
| 69 |
|
| 70 |
with st.spinner(f'Processing {file_type}...'):
|
| 71 |
-
processing_stdout = subprocess.run(shlex.split(f"""python extract_video.py --device
|
| 72 |
st.text(f'1. Processing {file_type} ✅')
|
| 73 |
with st.spinner(f'Analyzing {file_type}...'):
|
| 74 |
-
analyze_stdout = subprocess.run(shlex.split(f"""python inference.py --weight weights/model_params_ffpp_c23.pickle --device
|
| 75 |
st.text(f'2. Analyzing {file_type} ✅')
|
| 76 |
|
| 77 |
if len(os.listdir("{}/images/{}".format(base_folder, filename.split(".")[0]))) < 1:
|
|
|
|
| 68 |
|
| 69 |
|
| 70 |
with st.spinner(f'Processing {file_type}...'):
|
| 71 |
+
processing_stdout = subprocess.run(shlex.split(f"""python extract_video.py --device cpu --max_frames 50 --bs 2 --frame_interval 60 --confidence_threshold 0.997 --data_path "{filepath}" """), capture_output=True)
|
| 72 |
st.text(f'1. Processing {file_type} ✅')
|
| 73 |
with st.spinner(f'Analyzing {file_type}...'):
|
| 74 |
+
analyze_stdout = subprocess.run(shlex.split(f"""python inference.py --weight weights/model_params_ffpp_c23.pickle --device cpu --image_folder "{base_folder}/images/{filename}" """), capture_output=True)
|
| 75 |
st.text(f'2. Analyzing {file_type} ✅')
|
| 76 |
|
| 77 |
if len(os.listdir("{}/images/{}".format(base_folder, filename.split(".")[0]))) < 1:
|