Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files
app.py
CHANGED
|
@@ -4,12 +4,14 @@ import mlflow.sklearn
|
|
| 4 |
import pandas as pd
|
| 5 |
import numpy as np
|
| 6 |
from sklearn.preprocessing import LabelEncoder
|
|
|
|
| 7 |
|
| 8 |
# Load the trained model (assuming it's saved in MLflow)
|
| 9 |
-
logged_model = '
|
|
|
|
| 10 |
|
| 11 |
# Load model
|
| 12 |
-
model = mlflow.sklearn.load_model(logged_model)
|
| 13 |
|
| 14 |
# Define categorical features and their distinct values
|
| 15 |
categorical_features = ['employment_type', 'job_category', 'experience_level',
|
|
|
|
| 4 |
import pandas as pd
|
| 5 |
import numpy as np
|
| 6 |
from sklearn.preprocessing import LabelEncoder
|
| 7 |
+
import joblib
|
| 8 |
|
| 9 |
# Load the trained model (assuming it's saved in MLflow)
|
| 10 |
+
logged_model = 'model.pkl'
|
| 11 |
+
model = joblib.load(logged_model)
|
| 12 |
|
| 13 |
# Load model
|
| 14 |
+
# model = mlflow.sklearn.load_model(logged_model)
|
| 15 |
|
| 16 |
# Define categorical features and their distinct values
|
| 17 |
categorical_features = ['employment_type', 'job_category', 'experience_level',
|