AIEcosystem commited on
Commit
8cfe42f
·
verified ·
1 Parent(s): d9ad9ac

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +25 -14
src/streamlit_app.py CHANGED
@@ -65,7 +65,7 @@ st.set_page_config(layout="wide", page_title="Named Entity Recognition App")
65
  st.subheader("HR.ai", divider="green")
66
  st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
67
  expander = st.expander("**Important notes**")
68
- expander.write("""**Named Entities:** This HR.ai predicts fifty-nine (59) labels:"Email", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country", "Date_of_birth", "Gender", "Marital_status", "Person", "Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired", "Job_title", "Employment_type", "Year", "Date", "Company", "Organization", "Role", "Position","Performance_review", "Performance_rating", "Performance_score", "Sick_days", "Vacation_days", "Leave_of_absence", "Holidays", "Pension", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance", "Pay_rate", "Hourly_wage", "Annual_salary", "Overtime_pay", "Tax", "Social_security", "Deductions", "Job_posting", "Job_description", "Interview_type", "Applicant", "Candidate", "Referral", "Job_board", "Recruiter","Contract", "Offer_letter", "Agreement", "Training_course", "Certification", "Skill"
69
 
70
  Results are presented in easy-to-read tables, visualized in an interactive tree map, pie chart and bar chart, and are available for download along with a Glossary of tags.
71
 
@@ -106,24 +106,35 @@ if not comet_initialized:
106
  st.warning("Comet ML not initialized. Check environment variables.")
107
 
108
  # --- Label Definitions ---
109
- labels = ["Email", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country", "Date_of_birth", "Gender", "Marital_status", "Person", "Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired", "Job_title", "Employment_type", "Year", "Date", "Company", "Organization", "Role", "Position", "Performance_review", "Performance_rating", "Performance_score", "Sick_days", "Vacation_days", "Leave_of_absence", "Holidays", "Pension", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance", "Pay_rate", "Hourly_wage", "Annual_salary", "Overtime_pay", "Tax", "Social_security", "Deductions", "Job_posting", "Job_description", "Interview_type", "Applicant", "Candidate", "Referral", "Job_board", "Recruiter", "Contract", "Offer_letter", "Agreement", "Training_course", "Certification", "Skill"]
 
 
 
110
 
111
  # Create a mapping dictionary for labels to categories
 
112
  category_mapping = {
113
- "Contact Information": ["Email", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country"],
114
- "Personal Details": ["Date_of_birth", "Gender", "Marital_status", "Person"],
115
- "Employment Status": ["Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired"],
116
- "Employment Information" : ["Job_title", "Employment_type", "Year", "Date", "Company", "Organization", "Role", "Position"],
117
- "Performance": ["Performance_review", "Performance_rating", "Performance_score"],
118
- "Attendance": ["Sick_days", "Vacation_days", "Leave_of_absence", "Holidays"],
119
- "Benefits": ["Pension", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance"],
120
- "Compensation": ["Pay_rate", "Hourly_wage", "Annual_salary", "Overtime_pay"],
121
- "Deductions": ["Tax", "Social_security", "Deductions"],
122
- "Recruitment & Sourcing": ["Job_posting", "Job_description", "Interview_type", "Applicant", "Candidate", "Referral", "Job_board", "Recruiter"],
123
- "Legal & Compliance": ["Contract", "Offer_letter", "Agreement"],
124
- "Professional_Development": ["Training_course", "Certification", "Skill"]
125
  }
126
 
 
 
 
 
 
 
 
127
  # --- Model Loading ---
128
  @st.cache_resource
129
  def load_ner_model():
 
65
  st.subheader("HR.ai", divider="green")
66
  st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
67
  expander = st.expander("**Important notes**")
68
+ expander.write("""**Named Entities:** This HR.ai predicts thirty-six (36) labels: "Email", "Phone_number", "Street_address", "City", "Country", "Date_of_birth", "Marital_status", "Person", "Full_time", "Part_time", "Contract", "Terminated", "Retired", "Job_title", "Date", "Organization", "Role", "Performance_score", "Leave_of_absence", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance", "Pay_rate", "Annual_salary", "Tax", "Deductions", "Interview_type", "Applicant", "Referral", "Job_board", "Recruiter", "Offer_letter", "Agreement", "Certification", "Skill"
69
 
70
  Results are presented in easy-to-read tables, visualized in an interactive tree map, pie chart and bar chart, and are available for download along with a Glossary of tags.
71
 
 
106
  st.warning("Comet ML not initialized. Check environment variables.")
107
 
108
  # --- Label Definitions ---
109
+
110
+ labels = ["Email", "Phone_number", "Street_address", "City", "Country", "Date_of_birth", "Marital_status", "Person", "Full_time", "Part_time", "Contract", "Terminated", "Retired", "Job_title", "Date", "Organization", "Role", "Performance_score", "Leave_of_absence", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance", "Pay_rate", "Annual_salary", "Tax", "Deductions", "Interview_type", "Applicant", "Referral", "Job_board", "Recruiter", "Offer_letter", "Agreement", "Certification", "Skill"]
111
+
112
+
113
 
114
  # Create a mapping dictionary for labels to categories
115
+
116
  category_mapping = {
117
+ "Contact Information": ["Email", "Phone_number", "Street_address", "City", "Country"],
118
+ "Personal Details": ["Date_of_birth", "Marital_status", "Person"],
119
+ "Employment Status": ["Full_time", "Part_time", "Contract", "Terminated", "Retired"],
120
+ "Employment Information" : ["Job_title", "Date", "Organization", "Role"],
121
+ "Performance": ["Performance_score"],
122
+ "Attendance": ["Leave_of_absence"],
123
+ "Benefits": ["Retirement_plan", "Bonus", "Stock_options", "Health_insurance"],
124
+ "Compensation": ["Pay_rate", "Annual_salary"],
125
+ "Deductions": ["Tax", "Deductions"],
126
+ "Recruitment & Sourcing": ["Interview_type", "Applicant", "Referral", "Job_board", "Recruiter"],
127
+ "Legal & Compliance": ["Offer_letter", "Agreement"],
128
+ "Professional_Development": [ "Certification", "Skill"]
129
  }
130
 
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
  # --- Model Loading ---
139
  @st.cache_resource
140
  def load_ner_model():