Spaces:
Runtime error
Runtime error
Update app.py
Browse files9 unmodified lines101112131413141516179 unmodified lines inputs = 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 scalar result = "Income_bracket lesser than or equal to 50K" if prediction_value <= 0.5 else "Income_bracket greater than 50K" return f"Result: {result}" result = "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 interfaceapp.py+2-2