Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,4 @@
|
|
| 1 |
|
| 2 |
-
from numpy.linalg import matrix_upper_triangular as triu
|
| 3 |
-
|
| 4 |
import subprocess
|
| 5 |
subprocess.run(["pip", "install", "https://huggingface.co/Priyanka-Balivada/en_Resume_Matching_Keywords/resolve/main/en_Resume_Matching_Keywords-any-py3-none-any.whl"])
|
| 6 |
import en_Resume_Matching_Keywords # Now import your package
|
|
@@ -10,13 +8,14 @@ import nltk
|
|
| 10 |
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
|
| 11 |
from nltk.tokenize import word_tokenize
|
| 12 |
import PyPDF2
|
|
|
|
| 13 |
import pandas as pd
|
| 14 |
import re
|
| 15 |
import matplotlib.pyplot as plt
|
| 16 |
import seaborn as sns
|
| 17 |
import spacy
|
| 18 |
import numpy as np
|
| 19 |
-
|
| 20 |
# Download necessary NLTK data
|
| 21 |
nltk.download('punkt')
|
| 22 |
|
|
@@ -28,7 +27,7 @@ email_with_phone_regex = re.compile(r'(\d{10}).|.(\d{10})')
|
|
| 28 |
|
| 29 |
# Function to extract text from a PDF file
|
| 30 |
def extract_text_from_pdf(pdf_file):
|
| 31 |
-
pdf_reader =
|
| 32 |
text = ""
|
| 33 |
for page_num in range(len(pdf_reader.pages)):
|
| 34 |
text += pdf_reader.pages[page_num].extract_text()
|
|
|
|
| 1 |
|
|
|
|
|
|
|
| 2 |
import subprocess
|
| 3 |
subprocess.run(["pip", "install", "https://huggingface.co/Priyanka-Balivada/en_Resume_Matching_Keywords/resolve/main/en_Resume_Matching_Keywords-any-py3-none-any.whl"])
|
| 4 |
import en_Resume_Matching_Keywords # Now import your package
|
|
|
|
| 8 |
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
|
| 9 |
from nltk.tokenize import word_tokenize
|
| 10 |
import PyPDF2
|
| 11 |
+
from PyPDF2 import PdfReader
|
| 12 |
import pandas as pd
|
| 13 |
import re
|
| 14 |
import matplotlib.pyplot as plt
|
| 15 |
import seaborn as sns
|
| 16 |
import spacy
|
| 17 |
import numpy as np
|
| 18 |
+
|
| 19 |
# Download necessary NLTK data
|
| 20 |
nltk.download('punkt')
|
| 21 |
|
|
|
|
| 27 |
|
| 28 |
# Function to extract text from a PDF file
|
| 29 |
def extract_text_from_pdf(pdf_file):
|
| 30 |
+
pdf_reader = PdfReader(pdf_file)
|
| 31 |
text = ""
|
| 32 |
for page_num in range(len(pdf_reader.pages)):
|
| 33 |
text += pdf_reader.pages[page_num].extract_text()
|