ITACA_Insurace_NLP_v2 / OCR_Detector.py
danielperales's picture
Duplicate from dperales/ITACA_Insurance_Core_v4
27880c1
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)