pragnakalp commited on
Commit
e4afed1
·
verified ·
1 Parent(s): be5cd6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,9 +58,9 @@ Keras OCR
58
  def ocr_with_keras(img):
59
  print(zero.device)
60
  output_text = ''
61
- pipeline=keras_ocr.pipeline.Pipeline()
62
  images=[keras_ocr.tools.read(img)]
63
- predictions=pipeline.recognize(images)
64
  first=predictions[0]
65
  for text,box in first:
66
  output_text += ' '+ text
 
58
  def ocr_with_keras(img):
59
  print(zero.device)
60
  output_text = ''
61
+ pipeline=keras_ocr.pipeline.Pipeline().to(device)
62
  images=[keras_ocr.tools.read(img)]
63
+ predictions=pipeline.recognize(images).to(device)
64
  first=predictions[0]
65
  for text,box in first:
66
  output_text += ' '+ text