Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -3
src/streamlit_app.py
CHANGED
|
@@ -105,7 +105,7 @@ def load_gliner_model(model_name):
|
|
| 105 |
"""Initializes and caches the GLiNER model."""
|
| 106 |
try:
|
| 107 |
if model_name == "HR_AI":
|
| 108 |
-
return GLiNER.from_pretrained("
|
| 109 |
elif model_name == "InfoFinder":
|
| 110 |
return GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5", device="cpu")
|
| 111 |
except Exception as e:
|
|
@@ -113,13 +113,13 @@ def load_gliner_model(model_name):
|
|
| 113 |
st.stop()
|
| 114 |
|
| 115 |
# --- HR_AI Model Labels and Mappings ---
|
| 116 |
-
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"]
|
| 117 |
|
| 118 |
category_mapping = {
|
| 119 |
"Contact Information": ["Email", "Phone_number", "Street_address", "City", "Country"],
|
| 120 |
"Personal Details": ["Date_of_birth", "Marital_status", "Person"],
|
| 121 |
"Employment Status": ["Full_time", "Part_time", "Contract", "Terminated", "Retired"],
|
| 122 |
-
"Employment Information": ["Job_title", "Date", "Organization", "Role"],
|
| 123 |
"Performance": ["Performance_score"],
|
| 124 |
"Attendance": ["Leave_of_absence"],
|
| 125 |
"Benefits": ["Retirement_plan", "Bonus", "Stock_options", "Health_insurance"],
|
|
|
|
| 105 |
"""Initializes and caches the GLiNER model."""
|
| 106 |
try:
|
| 107 |
if model_name == "HR_AI":
|
| 108 |
+
return GLiNER.from_pretrained("gretelai/gretel-gliner-bi-large-v1.0", nested_ner=True, num_gen_sequences=2, gen_constraints=labels)
|
| 109 |
elif model_name == "InfoFinder":
|
| 110 |
return GLiNER.from_pretrained("knowledgator/gliner-multitask-large-v0.5", device="cpu")
|
| 111 |
except Exception as e:
|
|
|
|
| 113 |
st.stop()
|
| 114 |
|
| 115 |
# --- HR_AI Model Labels and Mappings ---
|
| 116 |
+
labels = ["Job_with_Date", "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"]
|
| 117 |
|
| 118 |
category_mapping = {
|
| 119 |
"Contact Information": ["Email", "Phone_number", "Street_address", "City", "Country"],
|
| 120 |
"Personal Details": ["Date_of_birth", "Marital_status", "Person"],
|
| 121 |
"Employment Status": ["Full_time", "Part_time", "Contract", "Terminated", "Retired"],
|
| 122 |
+
"Employment Information": ["Job_with_Date", "Job_title", "Date", "Organization", "Role"],
|
| 123 |
"Performance": ["Performance_score"],
|
| 124 |
"Attendance": ["Leave_of_absence"],
|
| 125 |
"Benefits": ["Retirement_plan", "Bonus", "Stock_options", "Health_insurance"],
|