Omarelrayes commited on
Commit
f39be23
·
verified ·
1 Parent(s): f4abeba

Update app/configs.py

Browse files
Files changed (1) hide show
  1. app/configs.py +3 -4
app/configs.py CHANGED
@@ -1,5 +1,5 @@
1
  import mlflow
2
- import mlflow.pyfunc
3
 
4
  from pathlib import Path
5
  from typing import Dict, Any, List
@@ -16,7 +16,6 @@ mlflow.set_tracking_uri(MLFLOW_URI)
16
  # ======================
17
 
18
  CLASSIFICATION_MODEL_URI = "runs:/7766854bcd074c8e856aea7c47680bf4/model"
19
-
20
  SEGMENTATION_MODEL_URI = "runs:/35f0bea9bf774ed59f2298a897c8cdf5/model"
21
 
22
  # ======================
@@ -37,7 +36,7 @@ def get_classification_model():
37
  if _classification_model is None:
38
  print("Loading Classification Model...")
39
 
40
- _classification_model = mlflow.pyfunc.load_model(
41
  CLASSIFICATION_MODEL_URI
42
  )
43
 
@@ -56,7 +55,7 @@ def get_segmentation_model():
56
  if _segmentation_model is None:
57
  print("Loading Segmentation Model...")
58
 
59
- _segmentation_model = mlflow.pyfunc.load_model(
60
  SEGMENTATION_MODEL_URI
61
  )
62
 
 
1
  import mlflow
2
+ import mlflow.tensorflow
3
 
4
  from pathlib import Path
5
  from typing import Dict, Any, List
 
16
  # ======================
17
 
18
  CLASSIFICATION_MODEL_URI = "runs:/7766854bcd074c8e856aea7c47680bf4/model"
 
19
  SEGMENTATION_MODEL_URI = "runs:/35f0bea9bf774ed59f2298a897c8cdf5/model"
20
 
21
  # ======================
 
36
  if _classification_model is None:
37
  print("Loading Classification Model...")
38
 
39
+ _classification_model = mlflow.tensorflow.load_model(
40
  CLASSIFICATION_MODEL_URI
41
  )
42
 
 
55
  if _segmentation_model is None:
56
  print("Loading Segmentation Model...")
57
 
58
+ _segmentation_model = mlflow.tensorflow.load_model(
59
  SEGMENTATION_MODEL_URI
60
  )
61