Noursine commited on
Commit
9f0b7eb
·
1 Parent(s): 01e5a61

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +7 -5
main.py CHANGED
@@ -38,8 +38,8 @@ def get_epsilons():
38
  # -------------------------------
39
  # Google Drive model download (irregular-flat)
40
  # -------------------------------
41
- MODEL_PATH_IRREGULAR = "/app/model_irregular_flat.pth"
42
- DRIVE_FILE_ID = "15vi4zPhCs3aBnGepVnXFOqQjxdK1jpnA" # Your new model
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: confirm model exists
69
  # -------------------------------
70
  if os.path.exists(MODEL_PATH_IRREGULAR):
71
- print(" Irregular-flat model is ready at", MODEL_PATH_IRREGULAR)
72
  else:
73
- print("Irregular-flat model NOT found. Something went wrong!")
 
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
  # -------------------------------