Spaces:
Build error
Build error
Update main.py
Browse files
main.py
CHANGED
|
@@ -38,8 +38,8 @@ def get_epsilons():
|
|
| 38 |
# -------------------------------
|
| 39 |
# Google Drive model download (irregular-flat)
|
| 40 |
# -------------------------------
|
| 41 |
-
MODEL_PATH_IRREGULAR = "/
|
| 42 |
-
DRIVE_FILE_ID = "15vi4zPhCs3aBnGepVnXFOqQjxdK1jpnA"
|
| 43 |
|
| 44 |
def download_irregular_model():
|
| 45 |
if not os.path.exists(MODEL_PATH_IRREGULAR):
|
|
@@ -64,13 +64,15 @@ def download_irregular_model():
|
|
| 64 |
|
| 65 |
# Download the irregular model at startup
|
| 66 |
download_irregular_model()
|
|
|
|
| 67 |
# -------------------------------
|
| 68 |
-
# Debug check
|
| 69 |
# -------------------------------
|
| 70 |
if os.path.exists(MODEL_PATH_IRREGULAR):
|
| 71 |
-
print("
|
| 72 |
else:
|
| 73 |
-
print("Irregular-flat model NOT found
|
|
|
|
| 74 |
# -------------------------------
|
| 75 |
# Detectron2 model setup
|
| 76 |
# -------------------------------
|
|
|
|
| 38 |
# -------------------------------
|
| 39 |
# Google Drive model download (irregular-flat)
|
| 40 |
# -------------------------------
|
| 41 |
+
MODEL_PATH_IRREGULAR = "/tmp/model_irregular_flat.pth" # <-- changed here
|
| 42 |
+
DRIVE_FILE_ID = "15vi4zPhCs3aBnGepVnXFOqQjxdK1jpnA"
|
| 43 |
|
| 44 |
def download_irregular_model():
|
| 45 |
if not os.path.exists(MODEL_PATH_IRREGULAR):
|
|
|
|
| 64 |
|
| 65 |
# Download the irregular model at startup
|
| 66 |
download_irregular_model()
|
| 67 |
+
|
| 68 |
# -------------------------------
|
| 69 |
+
# Debug check
|
| 70 |
# -------------------------------
|
| 71 |
if os.path.exists(MODEL_PATH_IRREGULAR):
|
| 72 |
+
print("Irregular-flat model is ready at", MODEL_PATH_IRREGULAR)
|
| 73 |
else:
|
| 74 |
+
print("Irregular-flat model NOT found! Something went wrong!")
|
| 75 |
+
|
| 76 |
# -------------------------------
|
| 77 |
# Detectron2 model setup
|
| 78 |
# -------------------------------
|