Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -141,8 +141,8 @@ def batch_detection(zip_file, timelapse, det_conf_thres):
|
|
141 |
os.makedirs(extract_path)
|
142 |
|
143 |
json_save_path = os.path.join(extract_path, "results.json")
|
144 |
-
|
145 |
-
|
146 |
# Check the contents of the extracted folder
|
147 |
extracted_files = os.listdir(extract_path)
|
148 |
|
@@ -351,5 +351,5 @@ with gr.Blocks() as demo:
|
|
351 |
vid_but.click(video_detection, inputs=[vid_in, vid_conf_sl_det, vid_conf_sl_clf, vid_fr, vid_enc], outputs=vid_out)
|
352 |
|
353 |
if __name__ == "__main__":
|
354 |
-
|
355 |
demo.launch(share=True)
|
|
|
141 |
os.makedirs(extract_path)
|
142 |
|
143 |
json_save_path = os.path.join(extract_path, "results.json")
|
144 |
+
with ZipFile(zip_file.name) as zfile:
|
145 |
+
zfile.extractall(extract_path)
|
146 |
# Check the contents of the extracted folder
|
147 |
extracted_files = os.listdir(extract_path)
|
148 |
|
|
|
351 |
vid_but.click(video_detection, inputs=[vid_in, vid_conf_sl_det, vid_conf_sl_clf, vid_fr, vid_enc], outputs=vid_out)
|
352 |
|
353 |
if __name__ == "__main__":
|
354 |
+
demo.queue()
|
355 |
demo.launch(share=True)
|