mashaelalbu commited on
Commit
c10f4ec
·
verified ·
1 Parent(s): c7898d4

Update app/utils.py

Browse files
Files changed (1) hide show
  1. app/utils.py +3 -3
app/utils.py CHANGED
@@ -25,7 +25,7 @@ class OCRModel:
25
  try:
26
  # First try with the standard approach
27
  self.tokenizer = AutoTokenizer.from_pretrained(
28
- 'stepfun-ai/GOT-OCR-2.0-hf',
29
  trust_remote_code=True,
30
  use_fast=False
31
  )
@@ -33,12 +33,12 @@ class OCRModel:
33
  logger.warning(f"Standard tokenizer failed, trying BertTokenizer: {str(e)}")
34
  # Fall back to BertTokenizer if AutoTokenizer fails
35
  self.tokenizer = BertTokenizer.from_pretrained(
36
- 'stepfun-ai/GOT-OCR-2.0-hf',
37
  trust_remote_code=True
38
  )
39
 
40
  self.model = AutoModel.from_pretrained(
41
- 'stepfun-ai/GOT-OCR-2.0-hf',
42
  trust_remote_code=True,
43
  low_cpu_mem_usage=True,
44
  device_map='auto',
 
25
  try:
26
  # First try with the standard approach
27
  self.tokenizer = AutoTokenizer.from_pretrained(
28
+ 'stepfun-ai/GOT-OCR2_0',
29
  trust_remote_code=True,
30
  use_fast=False
31
  )
 
33
  logger.warning(f"Standard tokenizer failed, trying BertTokenizer: {str(e)}")
34
  # Fall back to BertTokenizer if AutoTokenizer fails
35
  self.tokenizer = BertTokenizer.from_pretrained(
36
+ 'stepfun-ai/GOT-OCR2_0',
37
  trust_remote_code=True
38
  )
39
 
40
  self.model = AutoModel.from_pretrained(
41
+ 'stepfun-ai/GOT-OCR2_0',
42
  trust_remote_code=True,
43
  low_cpu_mem_usage=True,
44
  device_map='auto',