Spaces:
Sleeping
Sleeping
Upload 17 files
Browse files
app.py
CHANGED
|
@@ -83,7 +83,12 @@ def Salary(model, workclass, education, marital_status, occupation, relationship
|
|
| 83 |
scaler = pickle.load(f)
|
| 84 |
elif model == 2:
|
| 85 |
model_used = "Random Forest"
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
new_data = {
|
| 89 |
'age': age,
|
|
@@ -195,7 +200,12 @@ def Health(model, age, sex, bmi, children, smoker, region):
|
|
| 195 |
scaler = pickle.load(f)
|
| 196 |
elif model == 2:
|
| 197 |
model_used = "Random Forest"
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
#Inverting the dict to map the 'charges' values back to 'charges' labels
|
| 201 |
inverse_mapping_charges = {
|
|
|
|
| 83 |
scaler = pickle.load(f)
|
| 84 |
elif model == 2:
|
| 85 |
model_used = "Random Forest"
|
| 86 |
+
with open('models/best_rf_Salary_Classification.pkl', 'rb') as f:
|
| 87 |
+
loaded_model = pickle.load(f)
|
| 88 |
+
|
| 89 |
+
# Loading the scaler and transform the data
|
| 90 |
+
with open('models/z-score_scaler_rf_salary_classification.pkl', 'rb') as f:
|
| 91 |
+
scaler = pickle.load(f)
|
| 92 |
|
| 93 |
new_data = {
|
| 94 |
'age': age,
|
|
|
|
| 200 |
scaler = pickle.load(f)
|
| 201 |
elif model == 2:
|
| 202 |
model_used = "Random Forest"
|
| 203 |
+
with open('models/best_rf_Charges_Classification.pkl', 'rb') as f:
|
| 204 |
+
loaded_model = pickle.load(f)
|
| 205 |
+
|
| 206 |
+
# Loading the scaler and transform the data
|
| 207 |
+
with open('models/z-score_scaler_rf_charges_classification.pkl', 'rb') as f:
|
| 208 |
+
scaler = pickle.load(f)
|
| 209 |
|
| 210 |
#Inverting the dict to map the 'charges' values back to 'charges' labels
|
| 211 |
inverse_mapping_charges = {
|
models/best_rf_Charges_Classification.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6acb0e0ec78fbc3e05818778dffef502d6f9747b6c8e73378f45fc97f6885bf
|
| 3 |
+
size 6975365
|
models/best_rf_Salary_Classification.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b71f4d9c74e3746efdea7176c9506736902d76e5c23329dea06fc7b97a07746
|
| 3 |
+
size 47028040
|
models/z-score_scaler_rf_charges_classification.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b268e1fa1b5a7b30164255adad3756ccd8222d9033db68e8237ac33ef2f5b3d5
|
| 3 |
+
size 597
|
models/z-score_scaler_rf_salary_classification.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b268a96764622c1bac3951b1c898d6b04a8294db590af190cfff6f7440a8bc9c
|
| 3 |
+
size 726
|