hackerbyhobby commited on
Commit
b49f7c8
·
unverified ·
1 Parent(s): 7608698

updated app3

Browse files
Files changed (1) hide show
  1. app.py +0 -15
app.py CHANGED
@@ -49,21 +49,6 @@ def predict_heart_failure(age_category, alcohol_drinkers, chest_scan, covid_posi
49
  return "High likelihood of heart failure" if prediction == 1 else "Low likelihood of heart failure"
50
 
51
 
52
- def debug_model_input(input_df, model, threshold=0.5):
53
- print("Input DataFrame passed to the model:")
54
- print(input_df)
55
-
56
- # Predict probabilities
57
- probs = model.predict_proba(input_df)
58
- print("Predicted probabilities:")
59
- print(probs)
60
-
61
- # Adjust threshold and make predictions
62
- predictions = (probs[:, 1] >= threshold).astype(int)
63
- print("Predictions with adjusted threshold:")
64
- print(predictions)
65
-
66
- debug_model_input(test_df, model, threshold=0.4)
67
 
68
  # Define Gradio inputs
69
  gradio_inputs = [
 
49
  return "High likelihood of heart failure" if prediction == 1 else "Low likelihood of heart failure"
50
 
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  # Define Gradio inputs
54
  gradio_inputs = [