paudelanil commited on
Commit
401953b
1 Parent(s): f4f10a9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,8 +35,8 @@ def preprocess_image(image):
35
  # Load model directly
36
  from transformers import AutoTokenizer, AutoModel,ViTFeatureExtractor,TrOCRProcessor,VisionEncoderDecoderModel
37
 
38
- tokenizer = AutoTokenizer.from_pretrained("paudelanil/trocr-devanagari")
39
- model1 = VisionEncoderDecoderModel.from_pretrained("paudelanil/trocr-devanagari")
40
  feature_extractor1 = ViTFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
41
 
42
  processor1 = TrOCRProcessor(feature_extractor=feature_extractor1, tokenizer=tokenizer)
 
35
  # Load model directly
36
  from transformers import AutoTokenizer, AutoModel,ViTFeatureExtractor,TrOCRProcessor,VisionEncoderDecoderModel
37
 
38
+ tokenizer = AutoTokenizer.from_pretrained("paudelanil/trocr-devanagari-2")
39
+ model1 = VisionEncoderDecoderModel.from_pretrained("paudelanil/trocr-devanagari-2")
40
  feature_extractor1 = ViTFeatureExtractor.from_pretrained('google/vit-base-patch16-224-in21k')
41
 
42
  processor1 = TrOCRProcessor(feature_extractor=feature_extractor1, tokenizer=tokenizer)