Spaces:
Runtime error
Runtime error
updating files
Browse files
main.py
CHANGED
|
@@ -7,15 +7,15 @@ import os
|
|
| 7 |
import pickle
|
| 8 |
|
| 9 |
# setup
|
| 10 |
-
|
| 11 |
|
| 12 |
# Load the pipeline using pickle
|
| 13 |
-
pipeline_path = os.path.join(
|
| 14 |
with open(pipeline_path, 'rb') as file:
|
| 15 |
rfc_pipeline = pickle.load(file)
|
| 16 |
|
| 17 |
# Load the encoder using pickle
|
| 18 |
-
encoder_path = os.path.join(
|
| 19 |
with open(encoder_path, 'rb') as file:
|
| 20 |
encoder = pickle.load(file)
|
| 21 |
|
|
|
|
| 7 |
import pickle
|
| 8 |
|
| 9 |
# setup
|
| 10 |
+
FASTAPI_INCOME_CLASSIFICATION = os.path.abspath('./FASTAPI_INCOME_CLASSIFICATION')
|
| 11 |
|
| 12 |
# Load the pipeline using pickle
|
| 13 |
+
pipeline_path = os.path.join(FASTAPI_INCOME_CLASSIFICATION, 'rfc_pipeline.pkl')
|
| 14 |
with open(pipeline_path, 'rb') as file:
|
| 15 |
rfc_pipeline = pickle.load(file)
|
| 16 |
|
| 17 |
# Load the encoder using pickle
|
| 18 |
+
encoder_path = os.path.join(FASTAPI_INCOME_CLASSIFICATION, 'encoder.pkl')
|
| 19 |
with open(encoder_path, 'rb') as file:
|
| 20 |
encoder = pickle.load(file)
|
| 21 |
|