Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +7 -15
src/streamlit_app.py
CHANGED
|
@@ -75,18 +75,10 @@ st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
|
|
| 75 |
expander = st.expander("**Important notes**")
|
| 76 |
expander.write("""
|
| 77 |
**Named Entities:** This HR.ai predicts sixty (60) labels:
|
| 78 |
-
"
|
| 79 |
-
"
|
| 80 |
-
"
|
| 81 |
-
"
|
| 82 |
-
"Performance_review", "Performance_rating", "Performance_score",
|
| 83 |
-
"Sick_days", "Vacation_days", "Leave_of_absence", "Holidays",
|
| 84 |
-
"Pension", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance","Retire_date",
|
| 85 |
-
"Pay_rate", "Hourly_wage", "Annual_salary", "Overtime_pay",
|
| 86 |
-
"Tax", "Social_security", "Deductions",
|
| 87 |
-
"Job_posting", "Job_description", "Interview_type", "Applicant", "Candidate", "Referral", "Job_board", "Recruiter",
|
| 88 |
-
"Contract", "Offer_letter", "Agreement",
|
| 89 |
-
"Training_course", "Certification", "Skill"
|
| 90 |
|
| 91 |
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.
|
| 92 |
|
|
@@ -138,7 +130,7 @@ if not comet_initialized:
|
|
| 138 |
# --- Label Definitions ---
|
| 139 |
labels = [
|
| 140 |
"Email_address", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country",
|
| 141 |
-
"Date_of_birth", "Gender", "Marital_status", "
|
| 142 |
"Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired",
|
| 143 |
"Job_title", "Employment_type", "Start_date", "End_date", "Company", "Organization", "Role", "Position",
|
| 144 |
"Performance_review", "Performance_rating", "Performance_score",
|
|
@@ -158,7 +150,7 @@ category_mapping = {
|
|
| 158 |
|
| 159 |
|
| 160 |
"Contact Information": ["Email_address", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country"],
|
| 161 |
-
"Personal Details": ["Date_of_birth", "Gender", "Marital_status", "
|
| 162 |
"Employment Status": ["Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired"],
|
| 163 |
"Employment Information" : ["Job_title", "Employment_type", "Start_date", "End_date", "Company", "Organization", "Role", "Position"],
|
| 164 |
|
|
@@ -178,7 +170,7 @@ category_mapping = {
|
|
| 178 |
def load_ner_model():
|
| 179 |
"""Loads the GLiNER model and caches it."""
|
| 180 |
try:
|
| 181 |
-
return GLiNER.from_pretrained("gliner-
|
| 182 |
|
| 183 |
except Exception as e:
|
| 184 |
st.error(f"Failed to load NER model. Please check your internet connection or model availability: {e}")
|
|
|
|
| 75 |
expander = st.expander("**Important notes**")
|
| 76 |
expander.write("""
|
| 77 |
**Named Entities:** This HR.ai predicts sixty (60) labels:
|
| 78 |
+
"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", "Start_date", "End_date", "Company", "Organization", "Role", "Position",
|
| 79 |
+
"Performance_review", "Performance_rating", "Performance_score", "Sick_days", "Vacation_days", "Leave_of_absence", "Holidays", "Pension", "Retirement_plan", "Bonus", "Stock_options", "Health_insurance","Retire_date",
|
| 80 |
+
"Pay_rate", "Hourly_wage", "Annual_salary", "Overtime_pay", "Tax", "Social_security", "Deductions", "Job_posting", "Job_description", "Interview_type", "Applicant", "Candidate", "Referral", "Job_board", "Recruiter",
|
| 81 |
+
"Contract", "Offer_letter", "Agreement", "Training_course", "Certification", "Skill"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
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.
|
| 84 |
|
|
|
|
| 130 |
# --- Label Definitions ---
|
| 131 |
labels = [
|
| 132 |
"Email_address", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country",
|
| 133 |
+
"Date_of_birth", "Gender", "Marital_status", "Person",
|
| 134 |
"Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired",
|
| 135 |
"Job_title", "Employment_type", "Start_date", "End_date", "Company", "Organization", "Role", "Position",
|
| 136 |
"Performance_review", "Performance_rating", "Performance_score",
|
|
|
|
| 150 |
|
| 151 |
|
| 152 |
"Contact Information": ["Email_address", "Phone_number", "Street_address", "City", "State", "Zip_code", "Country"],
|
| 153 |
+
"Personal Details": ["Date_of_birth", "Gender", "Marital_status", "Person"],
|
| 154 |
"Employment Status": ["Full_time", "Part_time", "Contract", "Temporary", "Terminated", "Active", "Retired"],
|
| 155 |
"Employment Information" : ["Job_title", "Employment_type", "Start_date", "End_date", "Company", "Organization", "Role", "Position"],
|
| 156 |
|
|
|
|
| 170 |
def load_ner_model():
|
| 171 |
"""Loads the GLiNER model and caches it."""
|
| 172 |
try:
|
| 173 |
+
return GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5", nested_ner=True, num_gen_sequences=2, gen_constraints= labels)
|
| 174 |
|
| 175 |
except Exception as e:
|
| 176 |
st.error(f"Failed to load NER model. Please check your internet connection or model availability: {e}")
|