Priyanka-Balivada
commited on
Commit
β’
938ace2
1
Parent(s):
2c0f654
Update app.py
Browse files
app.py
CHANGED
@@ -62,9 +62,10 @@ def extract_skills(text, skills_keywords):
|
|
62 |
def preprocess_text(text):
|
63 |
return word_tokenize(text.lower())
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
68 |
|
69 |
def train_doc2vec_model(documents):
|
70 |
model = Doc2Vec(vector_size=20, min_count=2, epochs=50)
|
@@ -86,10 +87,6 @@ def accuracy_calculation(true_positives, false_positives, false_negatives):
|
|
86 |
return accuracy
|
87 |
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
# Streamlit Frontend
|
94 |
st.markdown("# Resume Matching Tool ππ")
|
95 |
st.markdown("An application to match resumes with a job description.")
|
@@ -217,14 +214,12 @@ if resumes_files:
|
|
217 |
st.write(f"Job Skills: {job_skills}")
|
218 |
|
219 |
# Display individual results in a table
|
220 |
-
results_df =
|
221 |
st.subheader("Individual Results")
|
222 |
st.dataframe(results_df)
|
223 |
tagged_resumes = [TaggedDocument(words=preprocess_text(
|
224 |
text), tags=[str(i)]) for i, text in enumerate(resumes_texts)]
|
225 |
model_resumes = train_doc2vec_model(tagged_resumes)
|
226 |
-
|
227 |
-
|
228 |
|
229 |
st.subheader("\nHeatmap:")
|
230 |
|
|
|
62 |
def preprocess_text(text):
|
63 |
return word_tokenize(text.lower())
|
64 |
|
65 |
+
@st.cache_data
|
66 |
+
def load_data(results):
|
67 |
+
df = pd.DataFrame(results)
|
68 |
+
return df
|
69 |
|
70 |
def train_doc2vec_model(documents):
|
71 |
model = Doc2Vec(vector_size=20, min_count=2, epochs=50)
|
|
|
87 |
return accuracy
|
88 |
|
89 |
|
|
|
|
|
|
|
|
|
90 |
# Streamlit Frontend
|
91 |
st.markdown("# Resume Matching Tool ππ")
|
92 |
st.markdown("An application to match resumes with a job description.")
|
|
|
214 |
st.write(f"Job Skills: {job_skills}")
|
215 |
|
216 |
# Display individual results in a table
|
217 |
+
results_df =load_data(results_list)
|
218 |
st.subheader("Individual Results")
|
219 |
st.dataframe(results_df)
|
220 |
tagged_resumes = [TaggedDocument(words=preprocess_text(
|
221 |
text), tags=[str(i)]) for i, text in enumerate(resumes_texts)]
|
222 |
model_resumes = train_doc2vec_model(tagged_resumes)
|
|
|
|
|
223 |
|
224 |
st.subheader("\nHeatmap:")
|
225 |
|