matsammut commited on
Commit
a506979
·
verified ·
1 Parent(s): 2f88952

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -2,13 +2,13 @@ import gradio as gr
2
  import joblib
3
 
4
  # Load your saved model
5
- model = joblib.load("ann_model.joblib")
6
 
7
- # Define the prediction function
8
- def predict(age, hours, education, capital_gain, capital_loss):
9
- features = [[age, hours, education, capital_gain, capital_loss]]
10
- prediction = model.predict(features)
11
- return "Income >50K" if prediction == 1 else "Income <=50K"
12
 
13
  # Create the Gradio interface
14
  interface = gr.Interface(
 
2
  import joblib
3
 
4
  # Load your saved model
5
+ # model = joblib.load("ann_model.joblib")
6
 
7
+ # # Define the prediction function
8
+ # def predict(age, hours, education, capital_gain, capital_loss):
9
+ # features = [[age, hours, education, capital_gain, capital_loss]]
10
+ # prediction = model.predict(features)
11
+ # return "Income >50K" if prediction == 1 else "Income <=50K"
12
 
13
  # Create the Gradio interface
14
  interface = gr.Interface(