saifeddinemk commited on
Commit
2d5897c
1 Parent(s): f9482e1

Init Commit

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -3,6 +3,7 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification, pipelin
3
  from fuzzywuzzy import fuzz
4
  import gradio as gr
5
  import fitz # PyMuPDF for PDF extraction
 
6
 
7
  # Load the SentenceTransformer model for embeddings
8
  model = SentenceTransformer('fine_tuned_job_resume_similarity_model')
@@ -23,7 +24,7 @@ TARGET_KEYWORDS = [
23
  # Function to extract text from PDF files
24
  def extract_text_from_pdf(pdf_file):
25
  text = ""
26
- with fitz.open(pdf_file) as doc:
27
  for page in doc:
28
  text += page.get_text("text")
29
  return text
 
3
  from fuzzywuzzy import fuzz
4
  import gradio as gr
5
  import fitz # PyMuPDF for PDF extraction
6
+ import PyMuPDF
7
 
8
  # Load the SentenceTransformer model for embeddings
9
  model = SentenceTransformer('fine_tuned_job_resume_similarity_model')
 
24
  # Function to extract text from PDF files
25
  def extract_text_from_pdf(pdf_file):
26
  text = ""
27
+ with PyMuPDF.open(pdf_file) as doc:
28
  for page in doc:
29
  text += page.get_text("text")
30
  return text