arssite commited on
Commit
7edccf8
1 Parent(s): 9b9dee3

Update ResumeOpt.py

Browse files
Files changed (1) hide show
  1. 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
- fill_mask = pipeline("fill-mask", model="bert-base-uncased", device=0) # Use GPU if available
 
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):