yhshin commited on
Commit
9949f53
β€’
1 Parent(s): e7bcbf9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -5,7 +5,9 @@ from PIL import Image
5
 
6
  processor = TrOCRProcessor.from_pretrained("microsoft/trocr-small-printed")
7
  model = VisionEncoderDecoderModel.from_pretrained("yhshin/latex-ocr")
8
- tokenizer = model.tokenizer
 
 
9
 
10
  # load image examples
11
 
 
5
 
6
  processor = TrOCRProcessor.from_pretrained("microsoft/trocr-small-printed")
7
  model = VisionEncoderDecoderModel.from_pretrained("yhshin/latex-ocr")
8
+
9
+ from tokenizers import Tokenizer
10
+ tokenizer = Tokenizer.from_file("tokenizer-wordlevel.json")
11
 
12
  # load image examples
13