Spaces:
Runtime error
Runtime error
Update app.py
Browse files31 unmodified lines3233343536373831 unmodified linesinputs = np.array([[float(age), float(workclass_value), float(education_value), float(education_num), float(marital_status_value), float(occupation_value), float(relationship_value), float(race_value), float(gender_value), float(capital_gain), float(capital_loss), float(hours_per_week), float(native_country_value)]])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}"# Convert mapping to Gradio dropdown options31 unmodified lines3233343536373831 unmodified linesinputs = np.array([[float(age), float(workclass_value), float(education_value), float(education_num), float(marital_status_value), float(occupation_value), float(relationship_value), float(race_value), float(gender_value), float(capital_gain), float(capital_loss), float(hours_per_week), float(native_country_value)]])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}"# Convert mapping to Gradio dropdown options
app.py+1-1