HARISH20205 commited on
Commit
8b6e40c
·
1 Parent(s): ff1084b
Files changed (1) hide show
  1. app.py +1 -14
app.py CHANGED
@@ -28,20 +28,7 @@ def predict_with_catboost(features_df, model_path):
28
  print(f"File size: {os.path.getsize(model_path)}")
29
 
30
  model = CatBoostClassifier()
31
- # Try different loading approaches
32
- try:
33
- print("Attempting to load model without format...")
34
- model.load_model(model_path)
35
- except Exception as e1:
36
- print(f"First attempt failed: {str(e1)}")
37
- try:
38
- print("Attempting to load model with format='binnar'...")
39
- model.load_model(model_path, format='binnar')
40
- except Exception as e2:
41
- print(f"Second attempt failed: {str(e2)}")
42
- print("Attempting final load with format='binary'...")
43
- model.load_model(model_path, format='binary')
44
-
45
  predictions = model.predict(features_df)
46
  return predictions
47
  except Exception as e:
 
28
  print(f"File size: {os.path.getsize(model_path)}")
29
 
30
  model = CatBoostClassifier()
31
+ model.load_model(model_path)
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  predictions = model.predict(features_df)
33
  return predictions
34
  except Exception as e: