Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -123,10 +123,15 @@ with col1:
|
|
123 |
col2.info('Predicting')
|
124 |
new_demand = np.array([list(mapping(county=county, sex=sex, property_type=property_type, loan=loan, income=income, loan_amount=loan_amount).values())])
|
125 |
if model_choice == 'Tree':
|
126 |
-
|
127 |
elif model_choice == 'RandomForest':
|
128 |
-
|
129 |
else:
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
|
|
|
123 |
col2.info('Predicting')
|
124 |
new_demand = np.array([list(mapping(county=county, sex=sex, property_type=property_type, loan=loan, income=income, loan_amount=loan_amount).values())])
|
125 |
if model_choice == 'Tree':
|
126 |
+
result = tree.predict(new_demand)
|
127 |
elif model_choice == 'RandomForest':
|
128 |
+
result = random.predict(new_demand)
|
129 |
else:
|
130 |
+
result = gbm.predict(new_demand)
|
131 |
+
|
132 |
+
if result[0]:
|
133 |
+
st.success('Accepted')
|
134 |
+
else:
|
135 |
+
st.failed("Rejected")
|
136 |
|
137 |
|