Commit 1ce12bfa authored by dmMaze's avatar dmMaze
Browse files

update requirements & ocr module

parent 46519c30
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -103,12 +103,8 @@ class OCRMIT32px(OCRBase):



from .manga_ocr import MangaOcr
MANGA_OCR_MODEL: MangaOcr = None
def load_manga_ocr(device='cpu') -> MangaOcr:
    manga_ocr = MangaOcr(device=device)
    return manga_ocr

MANGA_OCR_MODEL = None
@register_OCR('manga_ocr')
class MangaOCR(OCRBase):
    setup_params = {
@@ -126,6 +122,11 @@ class MangaOCR(OCRBase):

    def setup_ocr(self):

        from .manga_ocr import MangaOcr
        def load_manga_ocr(device='cpu') -> MangaOcr:
            manga_ocr = MangaOcr(device=device)
            return manga_ocr
        
        global MANGA_OCR_MODEL
        self.device = self.setup_params['device']['select']
        if MANGA_OCR_MODEL is None:
+1 −0
Original line number Diff line number Diff line
# To install pytorch cuda (gpu) version, please look https://pytorch.org/
numpy
urllib3==1.25.11 # https://github.com/psf/requests/issues/5740
jaconv
torch