karthikmn commited on
Commit
f735fcb
·
verified ·
1 Parent(s): 5a5d955

Create main.py

Browse files
Files changed (1) hide show
  1. main.py +8 -0
main.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from get_drive_model import ensure_model_download
2
+ import constants as const
3
+
4
+
5
+ def load_and_test_models():
6
+ # Ensure the models are downloaded before starting the Flask app
7
+ ensure_model_download(const.ANOMALY_DETECTION_MODEL_FILE_ID, 'anomaly_detection_model.h5')
8
+ ensure_model_download(const.ANOMALY_CLASSIFICATION_MODEL_FILE_ID, 'anomaly_classification_model.h5')