Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -63,7 +63,7 @@ def predict(
|
|
63 |
pred_proba = xgb_model.predict_proba(input_df)
|
64 |
|
65 |
# Output
|
66 |
-
predicted_status = "Unknown" if pred[0] == -1 else encoders['
|
67 |
probability = pred_proba[0][pred[0]] * 100 if pred[0] != -1 else "Unknown"
|
68 |
|
69 |
if predicted_status == "Returned to Client":
|
|
|
63 |
pred_proba = xgb_model.predict_proba(input_df)
|
64 |
|
65 |
# Output
|
66 |
+
predicted_status = "Unknown" if pred[0] == -1 else encoders['status_name'].inverse_transform([pred])[0]
|
67 |
probability = pred_proba[0][pred[0]] * 100 if pred[0] != -1 else "Unknown"
|
68 |
|
69 |
if predicted_status == "Returned to Client":
|