Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,11 @@ import json
|
|
4 |
import plotly
|
5 |
|
6 |
def predict_fraud(selected_model, selected_interpretability_method, step, transaction_type, amount, oldbalanceOrg):
|
|
|
|
|
|
|
|
|
|
|
7 |
url = "https://sea-lion-app-5kxay.ondigitalocean.app/predict_and_explain"
|
8 |
data = {
|
9 |
'selected_model': selected_model,
|
|
|
4 |
import plotly
|
5 |
|
6 |
def predict_fraud(selected_model, selected_interpretability_method, step, transaction_type, amount, oldbalanceOrg):
|
7 |
+
# Validation check for all fields
|
8 |
+
|
9 |
+
if not all([selected_model, selected_interpretability_method, step, transaction_type, amount, oldbalanceOrg]):
|
10 |
+
return "All fields are required. Please ensure no fields are left empty."
|
11 |
+
|
12 |
url = "https://sea-lion-app-5kxay.ondigitalocean.app/predict_and_explain"
|
13 |
data = {
|
14 |
'selected_model': selected_model,
|