Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ from PIL import Image
|
|
4 |
import torch
|
5 |
|
6 |
# Load the model and tokenizer
|
7 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
8 |
-
model = AutoModelForImageClassification.from_pretrained('
|
9 |
|
10 |
def perform_ocr(image):
|
11 |
# Ensure the image is in the right format
|
|
|
4 |
import torch
|
5 |
|
6 |
# Load the model and tokenizer
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained('ucaslcl/GOT-OCR2_0')
|
8 |
+
model = AutoModelForImageClassification.from_pretrained('ucaslcl/GOT-OCR2_0')
|
9 |
|
10 |
def perform_ocr(image):
|
11 |
# Ensure the image is in the right format
|