yasserrmd commited on
Commit
74836a0
1 Parent(s): 9aa533e

Update extract_text_from_pdf.py

Browse files
Files changed (1) hide show
  1. extract_text_from_pdf.py +1 -1
extract_text_from_pdf.py CHANGED
@@ -38,7 +38,7 @@ class PDFTextExtractor:
38
 
39
  # Initialize model and tokenizer
40
  self.accelerator = Accelerator()
41
- self.model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16,use_safetensors=True,device_map=device)
42
  self.tokenizer = AutoTokenizer.from_pretrained(model_name, use_safetensors=True)
43
  self.model, self.tokenizer = self.accelerator.prepare(self.model, self.tokenizer)
44
 
 
38
 
39
  # Initialize model and tokenizer
40
  self.accelerator = Accelerator()
41
+ self.model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16,use_safetensors=True,device_map=self.device)
42
  self.tokenizer = AutoTokenizer.from_pretrained(model_name, use_safetensors=True)
43
  self.model, self.tokenizer = self.accelerator.prepare(self.model, self.tokenizer)
44