Spaces:
Sleeping
Sleeping
Anushkabhat9
commited on
Upload similarity_score_refined.py
Browse files
similarity_score_refined.py
CHANGED
@@ -27,6 +27,7 @@ nltk.download('wordnet')
|
|
27 |
|
28 |
def extract_text(file_path):
|
29 |
import docx2txt
|
|
|
30 |
if file_path.endswith(".docx"):
|
31 |
# Extract text from DOCX file
|
32 |
return docx2txt.process(file_path)
|
|
|
27 |
|
28 |
def extract_text(file_path):
|
29 |
import docx2txt
|
30 |
+
import PyPDF2
|
31 |
if file_path.endswith(".docx"):
|
32 |
# Extract text from DOCX file
|
33 |
return docx2txt.process(file_path)
|