Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def OCR(image):
|
|
7 |
|
8 |
model = VisionEncoderDecoderModel.from_pretrained("kavg/TrOCR-SIN-DeiT-Handwritten")
|
9 |
tokenizer = AutoTokenizer.from_pretrained('NLPC-UOM/SinBERT-large')
|
10 |
-
feature_extractor = ViTImageProcessor.from_pretrained("
|
11 |
processor = TrOCRProcessor(image_processor=feature_extractor, tokenizer=tokenizer)
|
12 |
|
13 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|
|
|
7 |
|
8 |
model = VisionEncoderDecoderModel.from_pretrained("kavg/TrOCR-SIN-DeiT-Handwritten")
|
9 |
tokenizer = AutoTokenizer.from_pretrained('NLPC-UOM/SinBERT-large')
|
10 |
+
feature_extractor = ViTImageProcessor.from_pretrained("google/vit-base-patch16-224")
|
11 |
processor = TrOCRProcessor(image_processor=feature_extractor, tokenizer=tokenizer)
|
12 |
|
13 |
pixel_values = processor(image, return_tensors="pt").pixel_values
|