oddadmix commited on
Commit
13997eb
·
verified ·
1 Parent(s): 236a5de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -21,6 +21,8 @@ max_tokens = 2000
21
 
22
  @spaces.GPU
23
  def perform_ocr(image):
 
 
24
  """Process image and extract text using OCR model"""
25
  image = Image.fromarray(image)
26
  src = str(uuid.uuid4()) + ".png"
 
21
 
22
  @spaces.GPU
23
  def perform_ocr(image):
24
+ if image == None:
25
+ return "Error Processing"
26
  """Process image and extract text using OCR model"""
27
  image = Image.fromarray(image)
28
  src = str(uuid.uuid4()) + ".png"