yhshin commited on
Commit
6884da0
Β·
1 Parent(s): 9572969

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -3,6 +3,11 @@ from transformers import TrOCRProcessor, VisionEncoderDecoderModel
3
  import requests
4
  from PIL import Image
5
 
 
 
 
 
 
6
  processor = TrOCRProcessor.from_pretrained("microsoft/trocr-small-printed")
7
  model = VisionEncoderDecoderModel.from_pretrained("yhshin/latex-ocr")
8
 
 
3
  import requests
4
  from PIL import Image
5
 
6
+ url = 'https://huggingface.co/yhshin/latex-ocr/raw/main/tokenizer-wordlevel.json'
7
+ r = requests.get(url)
8
+ open('tokenizer-wordlevel.json' , 'w').write(r.content)
9
+
10
+
11
  processor = TrOCRProcessor.from_pretrained("microsoft/trocr-small-printed")
12
  model = VisionEncoderDecoderModel.from_pretrained("yhshin/latex-ocr")
13