luciancotolan commited on
Commit
1b3c491
·
1 Parent(s): d029b63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -19,7 +19,9 @@ def dataframe(file_obj):
19
  print(df.shape)
20
  y_pred = model.predict(df)
21
 
22
- pred_df = pd.DataFrame(y_pred)
 
 
23
  print(type(pred_df))
24
  print(pred_df.shape)
25
  # clr = classification_report(y_test, y_pred, target_names=['Not Fraud','Fraud'])
 
19
  print(df.shape)
20
  y_pred = model.predict(df)
21
 
22
+ pred_df = pd.DataFrame(y_pred, columns = ['isFraud'])
23
+ #append the predictions to the original dataframe
24
+ pred_df = pd.concat([df, pred_df], axis=1)
25
  print(type(pred_df))
26
  print(pred_df.shape)
27
  # clr = classification_report(y_test, y_pred, target_names=['Not Fraud','Fraud'])