From 845cecd0303c7f489ae95ce768e4bba1711524c6 Mon Sep 17 00:00:00 2001 From: tink2123 Date: Fri, 31 Dec 2021 13:08:51 +0800 Subject: [PATCH] mv fasttext for requirements --- ppocr/data/imaug/operators.py | 2 +- requirements.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ppocr/data/imaug/operators.py b/ppocr/data/imaug/operators.py index c3dfd316..daa67a25 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 1d10b23a..38657819 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,5 +12,4 @@ cython lxml premailer openpyxl -fasttext==0.9.1 paddlenlp>=2.2.1 -- GitLab