diff --git a/ppocr/data/imaug/operators.py b/ppocr/data/imaug/operators.py index c3dfd316f86d88b5c7fd52eb6ae23d22a4dd32eb..daa67a25dae93dde74fc0b92aad4aa6ef4d4c003 100644 --- a/ppocr/data/imaug/operators.py +++ b/ppocr/data/imaug/operators.py @@ -23,7 +23,6 @@ import sys import six import cv2 import numpy as np -import fasttext class DecodeImage(object): @@ -136,6 +135,7 @@ class ToCHWImage(object): class Fasttext(object): def __init__(self, path="None", **kwargs): + import fasttext self.fast_model = fasttext.load_model(path) def __call__(self, data): diff --git a/requirements.txt b/requirements.txt index 1d10b23a342095e93a34518ec869517db5c0c696..38657819961a93057685a388a17a28fc42cde0ff 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,4 @@ cython lxml premailer openpyxl -fasttext==0.9.1 paddlenlp>=2.2.1