ZennyKenny commited on
Commit
52cb4a5
·
verified ·
1 Parent(s): c5a9af9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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