Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ import requests
|
|
5 |
#import torch
|
6 |
|
7 |
# Load the processor and model
|
8 |
-
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-
|
9 |
-
model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-
|
10 |
|
11 |
def generate_text(input_image):
|
12 |
# Convert Gradio input image to PIL Image
|
|
|
5 |
#import torch
|
6 |
|
7 |
# Load the processor and model
|
8 |
+
processor = TrOCRProcessor.from_pretrained('microsoft/trocr-large-stage1')
|
9 |
+
model = VisionEncoderDecoderModel.from_pretrained('microsoft/trocr-large-stage1')
|
10 |
|
11 |
def generate_text(input_image):
|
12 |
# Convert Gradio input image to PIL Image
|