Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,8 +109,8 @@ def prediction():
|
|
| 109 |
from sklearn.preprocessing import StandardScaler
|
| 110 |
|
| 111 |
scaler = StandardScaler()
|
| 112 |
-
xtrain = scaler.fit_transform(xtrain)
|
| 113 |
-
xtest = scaler.transform(xtest)
|
| 114 |
|
| 115 |
|
| 116 |
from xgboost import XGBClassifier
|
|
@@ -174,7 +174,8 @@ def prediction():
|
|
| 174 |
# Vehicle_Damage , Annual_Premium , Policy_Sales_Channel , Vintage ])
|
| 175 |
#X_test = oneh.transform(report_data[ Gender , Age , Driving_License , Region_Code , Previously_Insured , Vehicle_Age ,
|
| 176 |
# Vehicle_Damage , Annual_Premium , Policy_Sales_Channel , Vintage ])
|
| 177 |
-
xtrain = scaler.fit_transform(xtrain)
|
|
|
|
| 178 |
report_data=scaler.transform(report_data)
|
| 179 |
response = model_xgb.predict(report_data)
|
| 180 |
if response==1:
|
|
|
|
| 109 |
from sklearn.preprocessing import StandardScaler
|
| 110 |
|
| 111 |
scaler = StandardScaler()
|
| 112 |
+
#xtrain = scaler.fit_transform(xtrain)
|
| 113 |
+
#xtest = scaler.transform(xtest)
|
| 114 |
|
| 115 |
|
| 116 |
from xgboost import XGBClassifier
|
|
|
|
| 174 |
# Vehicle_Damage , Annual_Premium , Policy_Sales_Channel , Vintage ])
|
| 175 |
#X_test = oneh.transform(report_data[ Gender , Age , Driving_License , Region_Code , Previously_Insured , Vehicle_Age ,
|
| 176 |
# Vehicle_Damage , Annual_Premium , Policy_Sales_Channel , Vintage ])
|
| 177 |
+
xtrain = scaler.fit_transform(xtrain)
|
| 178 |
+
st,write(xtrain.shape)
|
| 179 |
report_data=scaler.transform(report_data)
|
| 180 |
response = model_xgb.predict(report_data)
|
| 181 |
if response==1:
|