Spaces:
Sleeping
Sleeping
Update modeles/insightface_template_utils.py
Browse files
modeles/insightface_template_utils.py
CHANGED
|
@@ -8,8 +8,11 @@ def get_model():
|
|
| 8 |
global model
|
| 9 |
if model is None:
|
| 10 |
# On force le chargement à partir du dossier local
|
|
|
|
| 11 |
model_dir = os.path.join(os.path.dirname(__file__), "../models")
|
|
|
|
| 12 |
model = insightface.app.FaceAnalysis(name="buffalo_l", root=model_dir, providers=["CPUExecutionProvider"])
|
|
|
|
| 13 |
model.prepare(ctx_id=0)
|
| 14 |
return model
|
| 15 |
|
|
|
|
| 8 |
global model
|
| 9 |
if model is None:
|
| 10 |
# On force le chargement à partir du dossier local
|
| 11 |
+
print("On force le chargement à partir du dossier local")
|
| 12 |
model_dir = os.path.join(os.path.dirname(__file__), "../models")
|
| 13 |
+
print("On charge le model")
|
| 14 |
model = insightface.app.FaceAnalysis(name="buffalo_l", root=model_dir, providers=["CPUExecutionProvider"])
|
| 15 |
+
print("On prépare le model")
|
| 16 |
model.prepare(ctx_id=0)
|
| 17 |
return model
|
| 18 |
|