We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7ed6137 + bd0297c commit ae85283Copy full SHA for ae85283
1 file changed
Job Satisfaction Analysis/app.py
@@ -80,7 +80,22 @@
80
input_df = input_df[features]
81
82
# Make prediction
83
- prediction = model.predict(input_df)
+ prediction_numeric = model.predict(input_df)[0]
84
85
# Display the prediction
86
- st.write(f'Predicted Job Satisfaction: {prediction[0]}')
+ satisfaction_categories = [
87
+ 'Extremely dissatisfied',
88
+ 'Moderately dissatisfied',
89
+ 'Slightly dissatisfied',
90
+ 'Neither satisfied nor dissatisfied',
91
+ 'Slightly satisfied',
92
+ 'Moderately satisfied',
93
+ 'Extremely satisfied'
94
+]
95
+
96
+ # Map numeric prediction to category label
97
+ prediction_label = satisfaction_categories[int(prediction_numeric)]
98
99
+ # Display the prediction in categorical form
100
+ st.write(f'Predicted Job Satisfaction: {prediction_label}')
101
0 commit comments