Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,7 +66,19 @@ def predict_pipeline(img_input,
|
|
| 66 |
md_results,
|
| 67 |
bbox_likelihood_th)
|
| 68 |
|
| 69 |
-
|
| 70 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
|
|
|
| 72 |
|
|
|
|
| 66 |
md_results,
|
| 67 |
bbox_likelihood_th)
|
| 68 |
|
| 69 |
+
############################################################
|
| 70 |
|
| 71 |
+
############################################################
|
| 72 |
+
## Get DLC model and label map
|
| 73 |
+
|
| 74 |
+
# If model is found: do not download (previous execution is likely within same day)
|
| 75 |
+
# TODO: can we ask the user whether to reload dlc model if a directory is found?
|
| 76 |
+
if os.path.isdir(DLC_models_dict[dlc_model_input_str]) and \
|
| 77 |
+
len(os.listdir(DLC_models_dict[dlc_model_input_str])) > 0:
|
| 78 |
+
path_to_DLCmodel = DLC_models_dict[dlc_model_input_str]
|
| 79 |
+
else:
|
| 80 |
+
path_to_DLCmodel = download_huggingface_model(dlc_model_input_str,
|
| 81 |
+
DLC_models_dict[dlc_model_input_str])
|
| 82 |
|
| 83 |
+
|
| 84 |
|