Update app.py
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ def predict_fraud(amount, card_type, location, purchase_category, customer_age,
|
|
| 51 |
axes[0].bar(['Not Fraudulent', 'Fraudulent'], is_fraud_pred_prob)
|
| 52 |
axes[0].set_title('Fraud Detection Probability')
|
| 53 |
axes[0].set_ylabel('Probability')
|
| 54 |
-
if
|
| 55 |
# Plot Fraud Type Probabilities
|
| 56 |
fraud_types = fraud_type_encoder.classes_
|
| 57 |
axes[1].bar(fraud_types, fraud_type_pred_prob)
|
|
|
|
| 51 |
axes[0].bar(['Not Fraudulent', 'Fraudulent'], is_fraud_pred_prob)
|
| 52 |
axes[0].set_title('Fraud Detection Probability')
|
| 53 |
axes[0].set_ylabel('Probability')
|
| 54 |
+
if is_fraud_class==1:
|
| 55 |
# Plot Fraud Type Probabilities
|
| 56 |
fraud_types = fraud_type_encoder.classes_
|
| 57 |
axes[1].bar(fraud_types, fraud_type_pred_prob)
|