apjanco commited on
Commit
780e14f
·
1 Parent(s): dfeaa3c

add olmOCR

Browse files
Files changed (2) hide show
  1. README.md +0 -1
  2. app.py +6 -0
README.md CHANGED
@@ -9,7 +9,6 @@ app_file: app.py
9
  pinned: false
10
  license: mit
11
  short_description: A simple app for a workshop in December 2025.
12
- startup_duration_timeout: 4h
13
  ---
14
 
15
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
9
  pinned: false
10
  license: mit
11
  short_description: A simple app for a workshop in December 2025.
 
12
  ---
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -32,6 +32,9 @@ def array_to_image_path(image_array):
32
  models = {
33
  "nanonets/Nanonets-OCR-s": AutoModelForImageTextToText.from_pretrained(
34
  "nanonets/Nanonets-OCR-s", trust_remote_code=True, dtype="auto"
 
 
 
35
  ).cuda().eval()
36
  }
37
 
@@ -39,6 +42,9 @@ processors = {
39
 
40
  "nanonets/Nanonets-OCR-s": AutoProcessor.from_pretrained(
41
  "nanonets/Nanonets-OCR-s", trust_remote_code=True
 
 
 
42
  )
43
  }
44
 
 
32
  models = {
33
  "nanonets/Nanonets-OCR-s": AutoModelForImageTextToText.from_pretrained(
34
  "nanonets/Nanonets-OCR-s", trust_remote_code=True, dtype="auto"
35
+ ).cuda().eval(),
36
+ "allenai/olmOCR-7B-0725": AutoModelForImageTextToText.from_pretrained(
37
+ "allenai/olmOCR-7B-0725", trust_remote_code=True, dtype="auto"
38
  ).cuda().eval()
39
  }
40
 
 
42
 
43
  "nanonets/Nanonets-OCR-s": AutoProcessor.from_pretrained(
44
  "nanonets/Nanonets-OCR-s", trust_remote_code=True
45
+ ),
46
+ "allenai/olmOCR-7B-0725": AutoProcessor.from_pretrained(
47
+ "allenai/olmOCR-7B-0725", trust_remote_code=True
48
  )
49
  }
50