Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ def salarybracket(age, workclass, education, education_num, marital_status, occu
|
|
| 10 |
inputs = np.array([[age, workclass, education, education_num, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]])
|
| 11 |
prediction = model.predict(inputs)
|
| 12 |
prediction_value = prediction[0][0] # Assuming the prediction is a scalar
|
| 13 |
-
result = "Income_bracket lesser than or equal to 50K" if prediction_value <= 0.5 else "Income_bracket greater than 50K"
|
| 14 |
-
return f"
|
| 15 |
|
| 16 |
|
| 17 |
# Create the Gradio interface
|
|
|
|
| 10 |
inputs = np.array([[age, workclass, education, education_num, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]])
|
| 11 |
prediction = model.predict(inputs)
|
| 12 |
prediction_value = prediction[0][0] # Assuming the prediction is a scalar
|
| 13 |
+
result = "Income_bracket lesser than or equal to 50K ⬇️" if prediction_value <= 0.5 else "Income_bracket greater than 50K ⬆️"
|
| 14 |
+
return f"{result}"
|
| 15 |
|
| 16 |
|
| 17 |
# Create the Gradio interface
|