Spaces:
Sleeping
Sleeping
Commit ·
1509278
1
Parent(s): f638bd7
updated path
Browse files
routers/Prediction/prediction_route.py
CHANGED
|
@@ -16,11 +16,11 @@ global encoder, xgb_model
|
|
| 16 |
@router.on_event('startup')
|
| 17 |
def _loadPickleFiles():
|
| 18 |
|
| 19 |
-
with open("lib
|
| 20 |
global encoder
|
| 21 |
encoder = pickle.load(file)
|
| 22 |
|
| 23 |
-
with open("lib
|
| 24 |
global xgb_model
|
| 25 |
xgb_model = pickle.load(file)
|
| 26 |
|
|
|
|
| 16 |
@router.on_event('startup')
|
| 17 |
def _loadPickleFiles():
|
| 18 |
|
| 19 |
+
with open("lib/encoder.pkl", 'rb') as file:
|
| 20 |
global encoder
|
| 21 |
encoder = pickle.load(file)
|
| 22 |
|
| 23 |
+
with open("lib/model.pkl", 'rb') as file:
|
| 24 |
global xgb_model
|
| 25 |
xgb_model = pickle.load(file)
|
| 26 |
|