Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,14 @@ def main():
|
|
54 |
years_since_last_promotion = st.number_input("Years Since Last Promotion")
|
55 |
years_with_curr_manager = st.number_input("Years With Current Manager")
|
56 |
|
57 |
-
# Convert
|
|
|
58 |
monthly_income = str(monthly_income)
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
# Create a DataFrame to hold the user input data
|
61 |
input_data = pd.DataFrame({
|
@@ -64,7 +70,7 @@ def main():
|
|
64 |
'EnvironmentSatisfaction': [environment_satisfaction],
|
65 |
'JobRole': [job_role],
|
66 |
'JobSatisfaction': [job_satisfaction],
|
67 |
-
'MonthlyIncome': [monthly_income],
|
68 |
'NumCompaniesWorked': [num_companies_worked],
|
69 |
'OverTime': [over_time],
|
70 |
'PercentSalaryHike': [percent_salary_hike],
|
|
|
54 |
years_since_last_promotion = st.number_input("Years Since Last Promotion")
|
55 |
years_with_curr_manager = st.number_input("Years With Current Manager")
|
56 |
|
57 |
+
# Convert numerical features to strings
|
58 |
+
age = str(age)
|
59 |
monthly_income = str(monthly_income)
|
60 |
+
num_companies_worked = str(num_companies_worked)
|
61 |
+
percent_salary_hike = str(percent_salary_hike)
|
62 |
+
training_times_last_year = str(training_times_last_year)
|
63 |
+
years_since_last_promotion = str(years_since_last_promotion)
|
64 |
+
years_with_curr_manager = str(years_with_curr_manager)
|
65 |
|
66 |
# Create a DataFrame to hold the user input data
|
67 |
input_data = pd.DataFrame({
|
|
|
70 |
'EnvironmentSatisfaction': [environment_satisfaction],
|
71 |
'JobRole': [job_role],
|
72 |
'JobSatisfaction': [job_satisfaction],
|
73 |
+
'MonthlyIncome': [monthly_income],
|
74 |
'NumCompaniesWorked': [num_companies_worked],
|
75 |
'OverTime': [over_time],
|
76 |
'PercentSalaryHike': [percent_salary_hike],
|