Spaces:
Runtime error
Runtime error
Update app.py
Browse files9 unmodified lines10111213141516179 unmodified linesinputs = np.array([[age, workclass, education, education_num, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]])prediction = model.predict(inputs)prediction_value = prediction[0][0] # Assuming the prediction is a scalarresult = "Income_bracket lesser than or equal to 50K" if prediction_value <= 0.5 else "Income_bracket greater than 50K"return f"Result: {result}"# Create the Gradio interface9 unmodified lines10111213141516179 unmodified linesinputs = np.array([[age, workclass, education, education_num, marital_status, occupation, relationship, race, gender, capital_gain, capital_loss, hours_per_week, native_country]])prediction = model.predict(inputs)prediction_value = prediction[0][0] # Assuming the prediction is a scalarresult = "Income_bracket lesser than or equal to 50K ⬇️" if prediction_value <= 0.5 else "Income_bracket greater than 50K ⬆️"return f"{result}"# Create the Gradio interface
app.py+2-2