Othniel74 commited on
Commit
6e48224
·
verified ·
1 Parent(s): 9f12a38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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,