Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import matplotlib.pyplot as plt
|
|
8 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
9 |
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-large-handwritten")
|
10 |
|
|
|
11 |
def recognize_text(image):
|
12 |
try:
|
13 |
# Convert image to RGB if it's not already
|
|
|
8 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-large-handwritten")
|
9 |
model = VisionEncoderDecoderModel.from_pretrained("microsoft/trocr-large-handwritten")
|
10 |
|
11 |
+
@spaces.GPU
|
12 |
def recognize_text(image):
|
13 |
try:
|
14 |
# Convert image to RGB if it's not already
|