Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from PyPDF2 import PdfReader
|
3 |
import pandas as pd
|
|
|
4 |
|
5 |
uploaded_files = st.file_uploader(
|
6 |
"Choose a CSV file", accept_multiple_files=True
|
@@ -13,6 +14,21 @@ for uploaded_file in uploaded_files:
|
|
13 |
text_data+= page.extract_text()
|
14 |
|
15 |
|
16 |
-
data = pd.Series(text_data
|
17 |
|
18 |
-
st.dataframe(data) # view the text data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from PyPDF2 import PdfReader
|
3 |
import pandas as pd
|
4 |
+
from sklearn.feature_extraction.text import TfidfVectorizer
|
5 |
|
6 |
uploaded_files = st.file_uploader(
|
7 |
"Choose a CSV file", accept_multiple_files=True
|
|
|
14 |
text_data+= page.extract_text()
|
15 |
|
16 |
|
17 |
+
data = pd.Series(text_data, index = ["Resume"]
|
18 |
|
19 |
+
st.dataframe(data) # view the text data
|
20 |
+
|
21 |
+
st.subheader("Paste the job description")
|
22 |
+
|
23 |
+
txt = st.text_area("Job description")
|
24 |
+
st.write(txt)
|
25 |
+
|
26 |
+
vec = TfidfVectorizer()
|
27 |
+
tf_idf = vec.fit_transform(data['Resume'])
|
28 |
+
st.write(pd.DataFrame(tf_idf.toarray(), columns=vec.get_feature_names_out()))
|
29 |
+
from sklearn.metrics.pairwise import cosine_similarity
|
30 |
+
cosine_sim = cosine_similarity(tf_idf, tf_idf)
|
31 |
+
st.write(cosine_sim)
|
32 |
+
|
33 |
+
|
34 |
+
|