Update ResumeOpt.py
Browse files- ResumeOpt.py +2 -1
ResumeOpt.py
CHANGED
@@ -14,7 +14,8 @@ except IOError:
|
|
14 |
#nlp = spacy.load('en_core_web_sm')
|
15 |
# Load models quietly
|
16 |
#nlp = spacy.load('en_core_web_sm')
|
17 |
-
|
|
|
18 |
|
19 |
# Cell 3: Define functions
|
20 |
def extract_text_from_docx(file_path):
|
|
|
14 |
#nlp = spacy.load('en_core_web_sm')
|
15 |
# Load models quietly
|
16 |
#nlp = spacy.load('en_core_web_sm')
|
17 |
+
device = 0 if torch.cuda.is_available() else -1
|
18 |
+
fill_mask = pipeline("fill-mask", model="bert-base-uncased", device=device) # Use GPU if available
|
19 |
|
20 |
# Cell 3: Define functions
|
21 |
def extract_text_from_docx(file_path):
|