UniquePratham commited on
Commit
beb4859
1 Parent(s): 1a12824

Update ocr_cpu.py

Browse files
Files changed (1) hide show
  1. ocr_cpu.py +1 -1
ocr_cpu.py CHANGED
@@ -21,7 +21,7 @@ model = AutoModel.from_pretrained(
21
  # Ensure the model is in evaluation mode and loaded on CPU
22
  device = torch.device("cpu")
23
  dtype = torch.float32 # Use float32 on CPU
24
- model = model.eval("cpu")
25
 
26
  # OCR function
27
  def extract_text_got(uploaded_file):
 
21
  # Ensure the model is in evaluation mode and loaded on CPU
22
  device = torch.device("cpu")
23
  dtype = torch.float32 # Use float32 on CPU
24
+ model = model.eval()
25
 
26
  # OCR function
27
  def extract_text_got(uploaded_file):