File size: 296 Bytes
b2fbe3d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import pandas as pd
import numpy as np
import streamlit as st
import easyocr
import PIL
from PIL import Image, ImageDraw

class OCRDetector:

  def __init__(self):
    # it will only detect the English and Spanish part of the image as text
    self.reader = easyocr.Reader(['es','en'], gpu=False)