omvishesh commited on
Commit
c7da912
·
verified ·
1 Parent(s): 14a5be0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -8,9 +8,7 @@ tokenizer = AutoTokenizer.from_pretrained('ucaslcl/GOT-OCR2_0', trust_remote_cod
8
  model = AutoModel.from_pretrained('ucaslcl/GOT-OCR2_0',
9
  trust_remote_code=True,
10
  low_cpu_mem_usage=True,
11
- device_map='cuda',
12
- use_safetensors=True,
13
- pad_token_id=tokenizer.eos_token_id).eval().cuda()
14
 
15
  # Define the function to process images and extract text
16
  def extract_text_from_image(image):
 
8
  model = AutoModel.from_pretrained('ucaslcl/GOT-OCR2_0',
9
  trust_remote_code=True,
10
  low_cpu_mem_usage=True,
11
+ pad_token_id=tokenizer.eos_token_id).eval() # Removed device_map='cuda' and .cuda()
 
 
12
 
13
  # Define the function to process images and extract text
14
  def extract_text_from_image(image):