iuliaturc / detextify

Remove text from AI-generated images
MIT License
254 stars 22 forks source link

Errors on Google Colab #25

Closed davisengeler closed 1 year ago

davisengeler commented 1 year ago

Description

Hey there. This looks like an awesome project, but I'm struggling to get it working on Google Colab. I've tried to debug this a bit and install PaddlePaddle in different ways after the instructions in the readme didn't work, but for simplicity in this issue I'll only describe the errors when using the readme's instructions:

# On a GPU-enabled machine
pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple
pip install detextify

I appreciate any help you're able to provide. Thank you!

TL;DR

After installing with the recommended method from the README, I get the following error while importing from detextify:

from detextify.paddle_text_detector import PaddleTextDetector
from detextify.inpainter import LocalSDInpainter
from detextify.detextifier import Detextifier
Error: Can not import paddle core while this file exists: /usr/local/lib/python3.8/dist-packages/paddle/fluid/libpaddle.so

Context

I'm using a GPU accelerated runtime on Google Colab Pro.

Link to my notebook: https://colab.research.google.com/drive/12SiA5ZbIXXD6QXg83TgqN3WM7G6jm2QE

Here's the result of !nvidia-smi in case it's helpful for debugging:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.47.03    Driver Version: 510.47.03    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            Off  | 00000000:00:04.0 Off |                    0 |
| N/A   47C    P0    27W /  70W |      0MiB / 15360MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Installation Outputs

The following are the full outputs for each pip install:

PaddlePaddle

!pip install paddlepaddle-gpu -i https://mirror.baidu.com/pypi/simple

Output:

Looking in indexes: https://mirror.baidu.com/pypi/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting paddlepaddle-gpu
  Downloading https://mirror.baidu.com/pypi/packages/41/03/1c33aabd3229f2a80fac0e1c120e2a9baa465be224562416f112d4352716/paddlepaddle_gpu-2.4.1-cp38-cp38-manylinux1_x86_64.whl (585.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 585.2/585.2 MB 2.3 MB/s eta 0:00:00
Collecting paddle-bfloat==0.1.7
  Downloading https://mirror.baidu.com/pypi/packages/76/d7/ba0e1aeec33e20c78af5cf2fdbb7e7cabfe4679557e68759a17c97e03540/paddle_bfloat-0.1.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (385 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 385.5/385.5 KB 9.0 MB/s eta 0:00:00
Requirement already satisfied: opt-einsum==3.3.0 in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (3.3.0)
Requirement already satisfied: requests>=2.20.0 in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (2.25.1)
Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (1.15.0)
Requirement already satisfied: astor in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (0.8.1)
Requirement already satisfied: Pillow in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (7.1.2)
Requirement already satisfied: numpy>=1.13 in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (1.21.6)
Requirement already satisfied: protobuf<=3.20.0,>=3.1.0 in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (3.19.6)
Requirement already satisfied: decorator in /usr/local/lib/python3.8/dist-packages (from paddlepaddle-gpu) (4.4.2)
Requirement already satisfied: chardet<5,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests>=2.20.0->paddlepaddle-gpu) (4.0.0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests>=2.20.0->paddlepaddle-gpu) (2022.12.7)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests>=2.20.0->paddlepaddle-gpu) (1.24.3)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests>=2.20.0->paddlepaddle-gpu) (2.10)
Installing collected packages: paddle-bfloat, paddlepaddle-gpu
Successfully installed paddle-bfloat-0.1.7 paddlepaddle-gpu-2.4.1

detextify

!pip install detextify

Output:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting detextify
  Downloading detextify-0.1.8-py3-none-any.whl (12 kB)
Requirement already satisfied: torch<2.0.0,>=1.13.0 in /usr/local/lib/python3.8/dist-packages (from detextify) (1.13.1+cu116)
Collecting paddleocr<3.0.0.0,>=2.6.1.2
  Downloading paddleocr-2.6.1.2-py3-none-any.whl (440 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 440.6/440.6 KB 11.5 MB/s eta 0:00:00
Collecting requests<3.0.0,>=2.28.1
  Downloading requests-2.28.2-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 KB 8.2 MB/s eta 0:00:00
Collecting diffusers<0.11.0,>=0.10.2
  Downloading diffusers-0.10.2-py3-none-any.whl (503 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 503.1/503.1 KB 38.3 MB/s eta 0:00:00
Collecting azure-cognitiveservices-vision-computervision<0.10.0,>=0.9.0
  Downloading azure_cognitiveservices_vision_computervision-0.9.0-py2.py3-none-any.whl (39 kB)
Collecting pillow<10.0.0,>=9.3.0
  Downloading Pillow-9.4.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.4/3.4 MB 92.4 MB/s eta 0:00:00
Collecting transformers<5.0.0,>=4.25.1
  Downloading transformers-4.26.0-py3-none-any.whl (6.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 107.0 MB/s eta 0:00:00
Collecting replicate<0.5.0,>=0.4.0
  Downloading replicate-0.4.0.tar.gz (12 kB)
  Preparing metadata (setup.py) ... done
Collecting accelerate<0.16.0,>=0.15.0
  Downloading accelerate-0.15.0-py3-none-any.whl (191 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 191.5/191.5 KB 26.7 MB/s eta 0:00:00
Collecting numpy==1.23.5
  Downloading numpy-1.23.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 89.6 MB/s eta 0:00:00
Requirement already satisfied: absl-py<2.0.0,>=1.3.0 in /usr/local/lib/python3.8/dist-packages (from detextify) (1.3.0)
Collecting openai<0.26.0,>=0.25.0
  Downloading openai-0.25.0.tar.gz (44 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 44.9/44.9 KB 5.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: pyyaml in /usr/local/lib/python3.8/dist-packages (from accelerate<0.16.0,>=0.15.0->detextify) (6.0)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from accelerate<0.16.0,>=0.15.0->detextify) (21.3)
Requirement already satisfied: psutil in /usr/local/lib/python3.8/dist-packages (from accelerate<0.16.0,>=0.15.0->detextify) (5.4.8)
Collecting msrest>=0.5.0
  Downloading msrest-0.7.1-py3-none-any.whl (85 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 85.4/85.4 KB 11.8 MB/s eta 0:00:00
Collecting azure-common~=1.1
  Downloading azure_common-1.1.28-py2.py3-none-any.whl (14 kB)
Requirement already satisfied: filelock in /usr/local/lib/python3.8/dist-packages (from diffusers<0.11.0,>=0.10.2->detextify) (3.9.0)
Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.8/dist-packages (from diffusers<0.11.0,>=0.10.2->detextify) (2022.6.2)
Collecting huggingface-hub>=0.10.0
  Downloading huggingface_hub-0.12.0-py3-none-any.whl (190 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 190.3/190.3 KB 26.4 MB/s eta 0:00:00
Requirement already satisfied: importlib-metadata in /usr/local/lib/python3.8/dist-packages (from diffusers<0.11.0,>=0.10.2->detextify) (6.0.0)
Collecting pandas-stubs>=1.1.0.11
  Downloading pandas_stubs-1.5.2.230105-py3-none-any.whl (148 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.2/148.2 KB 22.0 MB/s eta 0:00:00
Requirement already satisfied: openpyxl>=3.0.7 in /usr/local/lib/python3.8/dist-packages (from openai<0.26.0,>=0.25.0->detextify) (3.0.10)
Requirement already satisfied: tqdm in /usr/local/lib/python3.8/dist-packages (from openai<0.26.0,>=0.25.0->detextify) (4.64.1)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.8/dist-packages (from openai<0.26.0,>=0.25.0->detextify) (4.4.0)
Requirement already satisfied: pandas>=1.2.3 in /usr/local/lib/python3.8/dist-packages (from openai<0.26.0,>=0.25.0->detextify) (1.3.5)
Collecting fonttools>=4.24.0
  Downloading fonttools-4.38.0-py3-none-any.whl (965 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 965.4/965.4 KB 70.7 MB/s eta 0:00:00
Collecting pdf2docx
  Downloading pdf2docx-0.5.6-py3-none-any.whl (148 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.4/148.4 KB 23.7 MB/s eta 0:00:00
Requirement already satisfied: opencv-contrib-python in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.6.0.66)
Requirement already satisfied: scikit-image in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.18.3)
Collecting premailer
  Downloading premailer-3.10.0-py2.py3-none-any.whl (19 kB)
Requirement already satisfied: shapely in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.0.0)
Collecting attrdict
  Downloading attrdict-2.0.1-py2.py3-none-any.whl (9.9 kB)
Requirement already satisfied: imgaug in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.4.0)
Collecting pyclipper
  Downloading pyclipper-1.3.0.post4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (619 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 619.2/619.2 KB 53.4 MB/s eta 0:00:00
Collecting PyMuPDF<1.21.0
  Downloading PyMuPDF-1.20.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 85.7 MB/s eta 0:00:00
Requirement already satisfied: lmdb in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.99)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.6.3)
Requirement already satisfied: opencv-python in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.6.0.66)
Collecting rapidfuzz
  Downloading rapidfuzz-2.13.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 99.6 MB/s eta 0:00:00
Collecting python-docx
  Downloading python-docx-0.8.11.tar.gz (5.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.6/5.6 MB 119.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cython in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.29.33)
Collecting fire>=0.3.0
  Downloading fire-0.5.0.tar.gz (88 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.3/88.3 KB 12.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: lxml in /usr/local/lib/python3.8/dist-packages (from paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.9.2)
Collecting visualdl
  Downloading visualdl-2.5.0-py3-none-any.whl (6.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 102.1 MB/s eta 0:00:00
Requirement already satisfied: pydantic in /usr/local/lib/python3.8/dist-packages (from replicate<0.5.0,>=0.4.0->detextify) (1.10.4)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.28.1->detextify) (2.10)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.28.1->detextify) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.28.1->detextify) (2022.12.7)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.8/dist-packages (from requests<3.0.0,>=2.28.1->detextify) (2.1.1)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
  Downloading tokenizers-0.13.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 118.4 MB/s eta 0:00:00
Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from fire>=0.3.0->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.15.0)
Requirement already satisfied: termcolor in /usr/local/lib/python3.8/dist-packages (from fire>=0.3.0->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.2.0)
Collecting isodate>=0.6.0
  Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.7/41.7 KB 5.9 MB/s eta 0:00:00
Collecting azure-core>=1.24.0
  Downloading azure_core-1.26.2-py3-none-any.whl (173 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 173.8/173.8 KB 22.5 MB/s eta 0:00:00
Requirement already satisfied: requests-oauthlib>=0.5.0 in /usr/local/lib/python3.8/dist-packages (from msrest>=0.5.0->azure-cognitiveservices-vision-computervision<0.10.0,>=0.9.0->detextify) (1.3.1)
Requirement already satisfied: et-xmlfile in /usr/local/lib/python3.8/dist-packages (from openpyxl>=3.0.7->openai<0.26.0,>=0.25.0->detextify) (1.1.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging>=20.0->accelerate<0.16.0,>=0.15.0->detextify) (3.0.9)
Requirement already satisfied: pytz>=2017.3 in /usr/local/lib/python3.8/dist-packages (from pandas>=1.2.3->openai<0.26.0,>=0.25.0->detextify) (2022.7)
Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.8/dist-packages (from pandas>=1.2.3->openai<0.26.0,>=0.25.0->detextify) (2.8.2)
Collecting types-pytz>=2022.1.1
  Downloading types_pytz-2022.7.1.0-py3-none-any.whl (4.8 kB)
Requirement already satisfied: scipy in /usr/local/lib/python3.8/dist-packages (from imgaug->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.7.3)
Requirement already satisfied: imageio in /usr/local/lib/python3.8/dist-packages (from imgaug->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.9.0)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.8/dist-packages (from imgaug->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (3.2.2)
Requirement already satisfied: PyWavelets>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from scikit-image->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.4.1)
Requirement already satisfied: networkx>=2.0 in /usr/local/lib/python3.8/dist-packages (from scikit-image->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (3.0)
Requirement already satisfied: tifffile>=2019.7.26 in /usr/local/lib/python3.8/dist-packages (from scikit-image->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2022.10.10)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.8/dist-packages (from importlib-metadata->diffusers<0.11.0,>=0.10.2->detextify) (3.11.0)
Collecting cssselect
  Downloading cssselect-1.2.0-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: cachetools in /usr/local/lib/python3.8/dist-packages (from premailer->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (5.2.1)
Collecting cssutils
  Downloading cssutils-2.6.0-py3-none-any.whl (399 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 399.7/399.7 KB 39.2 MB/s eta 0:00:00
Collecting bce-python-sdk
  Downloading bce_python_sdk-0.8.74-py3-none-any.whl (204 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 204.6/204.6 KB 27.6 MB/s eta 0:00:00
Collecting Flask-Babel>=3.0.0
  Downloading flask_babel-3.0.0-py3-none-any.whl (11 kB)
Collecting gradio
  Downloading gradio-3.16.2-py3-none-any.whl (14.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.2/14.2 MB 100.7 MB/s eta 0:00:00
Collecting x2paddle
  Downloading x2paddle-1.4.0-py3-none-any.whl (319 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 319.1/319.1 KB 38.5 MB/s eta 0:00:00
Requirement already satisfied: protobuf>=3.11.0 in /usr/local/lib/python3.8/dist-packages (from visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (3.19.6)
Collecting multiprocess
  Downloading multiprocess-0.70.14-py38-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.0/132.0 KB 18.5 MB/s eta 0:00:00
Collecting tritonclient[all]
  Downloading tritonclient-2.29.0-py3-none-manylinux1_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 108.8 MB/s eta 0:00:00
Collecting rarfile
  Downloading rarfile-4.0-py3-none-any.whl (28 kB)
Requirement already satisfied: flask>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.1.4)
Collecting onnx>=1.6.0
  Downloading onnx-1.13.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 13.5/13.5 MB 49.4 MB/s eta 0:00:00
Requirement already satisfied: click<8.0,>=5.1 in /usr/local/lib/python3.8/dist-packages (from flask>=1.1.1->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (7.1.2)
Requirement already satisfied: Jinja2<3.0,>=2.10.1 in /usr/local/lib/python3.8/dist-packages (from flask>=1.1.1->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.11.3)
Requirement already satisfied: itsdangerous<2.0,>=0.24 in /usr/local/lib/python3.8/dist-packages (from flask>=1.1.1->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.1.0)
Requirement already satisfied: Werkzeug<2.0,>=0.15 in /usr/local/lib/python3.8/dist-packages (from flask>=1.1.1->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.0.1)
Requirement already satisfied: Babel<3.0.0,>=2.11.0 in /usr/local/lib/python3.8/dist-packages (from Flask-Babel>=3.0.0->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.11.0)
Collecting flask>=1.1.1
  Downloading Flask-2.2.2-py3-none-any.whl (101 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.5/101.5 KB 13.9 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of flask to determine which version is compatible with other requirements. This could take a while.
Collecting Werkzeug>=2.2.2
  Downloading Werkzeug-2.2.2-py3-none-any.whl (232 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.7/232.7 KB 30.8 MB/s eta 0:00:00
Collecting click>=8.0
  Downloading click-8.1.3-py3-none-any.whl (96 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.6/96.6 KB 15.3 MB/s eta 0:00:00
Collecting itsdangerous>=2.0
  Downloading itsdangerous-2.1.2-py3-none-any.whl (15 kB)
Collecting Jinja2>=3.0
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 KB 20.7 MB/s eta 0:00:00
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.8/dist-packages (from Jinja2>=3.0->flask>=1.1.1->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.0.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib->imgaug->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib->imgaug->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.4.4)
Collecting protobuf>=3.11.0
  Downloading protobuf-3.20.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 69.1 MB/s eta 0:00:00
Requirement already satisfied: oauthlib>=3.0.0 in /usr/local/lib/python3.8/dist-packages (from requests-oauthlib>=0.5.0->msrest>=0.5.0->azure-cognitiveservices-vision-computervision<0.10.0,>=0.9.0->detextify) (3.2.2)
Collecting scipy
  Downloading scipy-1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 34.5/34.5 MB 52.0 MB/s eta 0:00:00
Requirement already satisfied: future>=0.6.0 in /usr/local/lib/python3.8/dist-packages (from bce-python-sdk->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.16.0)
Collecting pycryptodome>=3.8.0
  Downloading pycryptodome-3.17-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 94.9 MB/s eta 0:00:00
Collecting ffmpy
  Downloading ffmpy-0.3.0.tar.gz (4.8 kB)
  Preparing metadata (setup.py) ... done
Collecting markdown-it-py[linkify,plugins]
  Downloading markdown_it_py-2.1.0-py3-none-any.whl (84 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.5/84.5 KB 13.0 MB/s eta 0:00:00
Collecting aiofiles
  Downloading aiofiles-22.1.0-py3-none-any.whl (14 kB)
Collecting orjson
  Downloading orjson-3.8.5-cp38-cp38-manylinux_2_28_x86_64.whl (140 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.6/140.6 KB 17.1 MB/s eta 0:00:00
Collecting uvicorn
  Downloading uvicorn-0.20.0-py3-none-any.whl (56 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.9/56.9 KB 7.7 MB/s eta 0:00:00
Collecting python-multipart
  Downloading python-multipart-0.0.5.tar.gz (32 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: aiohttp in /usr/local/lib/python3.8/dist-packages (from gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (3.8.3)
Collecting websockets>=10.0
  Downloading websockets-10.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (106 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.0/107.0 KB 14.7 MB/s eta 0:00:00
Collecting fastapi
  Downloading fastapi-0.89.1-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 KB 7.8 MB/s eta 0:00:00
Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.8/dist-packages (from gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.2.0)
Requirement already satisfied: fsspec in /usr/local/lib/python3.8/dist-packages (from gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2022.11.0)
Collecting httpx
  Downloading httpx-0.23.3-py3-none-any.whl (71 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.5/71.5 KB 10.1 MB/s eta 0:00:00
Collecting pydub
  Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Requirement already satisfied: dill>=0.3.6 in /usr/local/lib/python3.8/dist-packages (from multiprocess->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.3.6)
Collecting python-rapidjson>=0.9.1
  Downloading python_rapidjson-1.9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 75.1 MB/s eta 0:00:00
Collecting tritonclient[all]
  Downloading tritonclient-2.28.0-py3-none-manylinux1_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 110.9 MB/s eta 0:00:00
  Downloading tritonclient-2.27.0-py3-none-manylinux1_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 110.4 MB/s eta 0:00:00
  Downloading tritonclient-2.26.0-py3-none-manylinux1_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 97.4 MB/s eta 0:00:00
Collecting geventhttpclient>=1.4.4
  Downloading geventhttpclient-2.0.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (104 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.2/104.2 KB 15.3 MB/s eta 0:00:00
Collecting tritonclient[all]
  Downloading tritonclient-2.25.0-py3-none-manylinux1_x86_64.whl (11.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.4/11.4 MB 111.0 MB/s eta 0:00:00
  Downloading tritonclient-2.24.0-py3-none-manylinux1_x86_64.whl (8.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 112.8 MB/s eta 0:00:00
  Downloading tritonclient-2.23.0-py3-none-manylinux1_x86_64.whl (8.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 16.3 MB/s eta 0:00:00
  Downloading tritonclient-2.22.4-py3-none-manylinux1_x86_64.whl (8.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 117.2 MB/s eta 0:00:00
  Downloading tritonclient-2.22.3-py3-none-manylinux1_x86_64.whl (7.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 121.2 MB/s eta 0:00:00
  Downloading tritonclient-2.22.0-py3-none-manylinux1_x86_64.whl (7.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.9/7.9 MB 113.2 MB/s eta 0:00:00
Collecting grpcio==1.41.0
  Downloading grpcio-1.41.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 109.4 MB/s eta 0:00:00
Requirement already satisfied: sympy in /usr/local/lib/python3.8/dist-packages (from x2paddle->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.7.1)
Requirement already satisfied: entrypoints in /usr/local/lib/python3.8/dist-packages (from altair>=4.2.0->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.4)
Requirement already satisfied: toolz in /usr/local/lib/python3.8/dist-packages (from altair>=4.2.0->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.12.0)
Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.8/dist-packages (from altair>=4.2.0->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.3.3)
Collecting gevent>=0.13
  Downloading gevent-22.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 111.4 MB/s eta 0:00:00
Collecting brotli
  Downloading Brotli-1.0.9-cp38-cp38-manylinux1_x86_64.whl (357 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 357.2/357.2 KB 41.3 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (22.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.8/dist-packages (from aiohttp->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.3.3)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.8/dist-packages (from aiohttp->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (4.0.2)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.8/dist-packages (from aiohttp->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.3.1)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.8.2)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (6.0.4)
Collecting starlette==0.22.0
  Downloading starlette-0.22.0-py3-none-any.whl (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.3/64.3 KB 10.7 MB/s eta 0:00:00
Collecting anyio<5,>=3.4.0
  Downloading anyio-3.6.2-py3-none-any.whl (80 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.6/80.6 KB 10.1 MB/s eta 0:00:00
Collecting rfc3986[idna2008]<2,>=1.3
  Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Collecting sniffio
  Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting httpcore<0.17.0,>=0.15.0
  Downloading httpcore-0.16.3-py3-none-any.whl (69 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.6/69.6 KB 10.9 MB/s eta 0:00:00
Collecting mdurl~=0.1
  Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting mdit-py-plugins
  Downloading mdit_py_plugins-0.3.3-py3-none-any.whl (50 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.5/50.5 KB 7.9 MB/s eta 0:00:00
Collecting linkify-it-py~=1.0
  Downloading linkify_it_py-1.0.3-py3-none-any.whl (19 kB)
Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.8/dist-packages (from sympy->x2paddle->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (1.2.1)
Collecting h11>=0.8
  Downloading h11-0.14.0-py3-none-any.whl (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 KB 8.7 MB/s eta 0:00:00
Collecting zope.interface
  Downloading zope.interface-5.5.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (261 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 261.4/261.4 KB 30.3 MB/s eta 0:00:00
Requirement already satisfied: greenlet>=2.0.0 in /usr/local/lib/python3.8/dist-packages (from gevent>=0.13->geventhttpclient>=1.4.4->tritonclient[all]->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (2.0.1)
Collecting zope.event
  Downloading zope.event-4.6-py2.py3-none-any.whl (6.8 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/dist-packages (from gevent>=0.13->geventhttpclient>=1.4.4->tritonclient[all]->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (57.4.0)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (0.19.3)
Requirement already satisfied: importlib-resources>=1.4.0 in /usr/local/lib/python3.8/dist-packages (from jsonschema>=3.0->altair>=4.2.0->gradio->visualdl->paddleocr<3.0.0.0,>=2.6.1.2->detextify) (5.10.2)
Collecting uc-micro-py
  Downloading uc_micro_py-1.0.1-py3-none-any.whl (6.2 kB)
Building wheels for collected packages: openai, replicate, fire, python-docx, ffmpy, python-multipart
  Building wheel for openai (pyproject.toml) ... done
  Created wheel for openai: filename=openai-0.25.0-py3-none-any.whl size=55880 sha256=dc96d592f2725d79e6677ff2ebf2297aa35be6254083b8afa56bc88f18a50392
  Stored in directory: /root/.cache/pip/wheels/4b/92/33/6f57c7aae0b16875267999a50570e81f15eecec577ebe05a2e
  Building wheel for replicate (setup.py) ... done
  Created wheel for replicate: filename=replicate-0.4.0-py3-none-any.whl size=14145 sha256=c072ece65229b5bf5082a9af8eb2589304dfd2717e18458848ebf8663150995f
  Stored in directory: /root/.cache/pip/wheels/64/61/2f/b1306f636d57ed0586f1a042be27a097fc6f50d030ca4d53ec
  Building wheel for fire (setup.py) ... done
  Created wheel for fire: filename=fire-0.5.0-py2.py3-none-any.whl size=116949 sha256=fee35df34f1835c392bdd69022652c7c410571567789fb7112dd063b9792a331
  Stored in directory: /root/.cache/pip/wheels/5b/eb/43/7295e71293b218ddfd627f935229bf54af9018add7fbb5aac6
  Building wheel for python-docx (setup.py) ... done
  Created wheel for python-docx: filename=python_docx-0.8.11-py3-none-any.whl size=184505 sha256=5d0a519685171e920c77cb51288ced59c6d556aaf007dca76cf7fcac64fabb73
  Stored in directory: /root/.cache/pip/wheels/32/b8/b2/c4c2b95765e615fe139b0b17b5ea7c0e1b6519b0a9ec8fb34d
  Building wheel for ffmpy (setup.py) ... done
  Created wheel for ffmpy: filename=ffmpy-0.3.0-py3-none-any.whl size=4711 sha256=fcd822227bfdac15b90d8c8459c484e8406dead9d36086294a8568a0b9adcd5b
  Stored in directory: /root/.cache/pip/wheels/ff/5b/59/913b443e7369dc04b61f607a746b6f7d83fb65e2e19fcc958d
  Building wheel for python-multipart (setup.py) ... done
  Created wheel for python-multipart: filename=python_multipart-0.0.5-py3-none-any.whl size=31678 sha256=d7c9197e1929aad78e37210050af69c557128abbd98165535755774294b87dfb
  Stored in directory: /root/.cache/pip/wheels/9e/fc/1c/cf980e6413d3ee8e70cd8f39e2366b0f487e3e221aeb452eb0
Successfully built openai replicate fire python-docx ffmpy python-multipart
Installing collected packages: types-pytz, tokenizers, rfc3986, rarfile, pydub, pyclipper, ffmpy, brotli, azure-common, zope.interface, zope.event, websockets, uc-micro-py, sniffio, requests, rapidfuzz, python-rapidjson, python-multipart, python-docx, PyMuPDF, pycryptodome, protobuf, pillow, pandas-stubs, orjson, numpy, multiprocess, mdurl, MarkupSafe, itsdangerous, isodate, h11, grpcio, fonttools, fire, cssutils, cssselect, click, attrdict, aiofiles, x2paddle, Werkzeug, uvicorn, tritonclient, scipy, replicate, premailer, onnx, markdown-it-py, linkify-it-py, Jinja2, huggingface-hub, gevent, bce-python-sdk, azure-core, anyio, accelerate, transformers, starlette, pdf2docx, openai, msrest, mdit-py-plugins, httpcore, geventhttpclient, flask, diffusers, httpx, Flask-Babel, fastapi, azure-cognitiveservices-vision-computervision, gradio, visualdl, paddleocr, detextify
  Attempting uninstall: requests
    Found existing installation: requests 2.25.1
    Uninstalling requests-2.25.1:
      Successfully uninstalled requests-2.25.1
  Attempting uninstall: protobuf
    Found existing installation: protobuf 3.19.6
    Uninstalling protobuf-3.19.6:
      Successfully uninstalled protobuf-3.19.6
  Attempting uninstall: pillow
    Found existing installation: Pillow 7.1.2
    Uninstalling Pillow-7.1.2:
      Successfully uninstalled Pillow-7.1.2
  Attempting uninstall: numpy
    Found existing installation: numpy 1.21.6
    Uninstalling numpy-1.21.6:
      Successfully uninstalled numpy-1.21.6
  Attempting uninstall: MarkupSafe
    Found existing installation: MarkupSafe 2.0.1
    Uninstalling MarkupSafe-2.0.1:
      Successfully uninstalled MarkupSafe-2.0.1
  Attempting uninstall: itsdangerous
    Found existing installation: itsdangerous 1.1.0
    Uninstalling itsdangerous-1.1.0:
      Successfully uninstalled itsdangerous-1.1.0
  Attempting uninstall: grpcio
    Found existing installation: grpcio 1.51.1
    Uninstalling grpcio-1.51.1:
      Successfully uninstalled grpcio-1.51.1
  Attempting uninstall: click
    Found existing installation: click 7.1.2
    Uninstalling click-7.1.2:
      Successfully uninstalled click-7.1.2
  Attempting uninstall: Werkzeug
    Found existing installation: Werkzeug 1.0.1
    Uninstalling Werkzeug-1.0.1:
      Successfully uninstalled Werkzeug-1.0.1
  Attempting uninstall: scipy
    Found existing installation: scipy 1.7.3
    Uninstalling scipy-1.7.3:
      Successfully uninstalled scipy-1.7.3
  Attempting uninstall: Jinja2
    Found existing installation: Jinja2 2.11.3
    Uninstalling Jinja2-2.11.3:
      Successfully uninstalled Jinja2-2.11.3
  Attempting uninstall: flask
    Found existing installation: Flask 1.1.4
    Uninstalling Flask-1.1.4:
      Successfully uninstalled Flask-1.1.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.9.2 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.
tensorboard 2.9.1 requires protobuf<3.20,>=3.9.2, but you have protobuf 3.20.3 which is incompatible.
paddlepaddle-gpu 2.4.1 requires protobuf<=3.20.0,>=3.1.0, but you have protobuf 3.20.3 which is incompatible.
notebook 5.7.16 requires jinja2<=3.0.0, but you have jinja2 3.1.2 which is incompatible.
grpcio-status 1.48.2 requires grpcio>=1.48.2, but you have grpcio 1.41.0 which is incompatible.
google-cloud-bigquery 3.4.1 requires grpcio<2.0dev,>=1.47.0, but you have grpcio 1.41.0 which is incompatible.
Successfully installed Flask-Babel-3.0.0 Jinja2-3.1.2 MarkupSafe-2.1.2 PyMuPDF-1.20.2 Werkzeug-2.2.2 accelerate-0.15.0 aiofiles-22.1.0 anyio-3.6.2 attrdict-2.0.1 azure-cognitiveservices-vision-computervision-0.9.0 azure-common-1.1.28 azure-core-1.26.2 bce-python-sdk-0.8.74 brotli-1.0.9 click-8.1.3 cssselect-1.2.0 cssutils-2.6.0 detextify-0.1.8 diffusers-0.10.2 fastapi-0.89.1 ffmpy-0.3.0 fire-0.5.0 flask-2.2.2 fonttools-4.38.0 gevent-22.10.2 geventhttpclient-2.0.8 gradio-3.16.2 grpcio-1.41.0 h11-0.14.0 httpcore-0.16.3 httpx-0.23.3 huggingface-hub-0.12.0 isodate-0.6.1 itsdangerous-2.1.2 linkify-it-py-1.0.3 markdown-it-py-2.1.0 mdit-py-plugins-0.3.3 mdurl-0.1.2 msrest-0.7.1 multiprocess-0.70.14 numpy-1.23.5 onnx-1.13.0 openai-0.25.0 orjson-3.8.5 paddleocr-2.6.1.2 pandas-stubs-1.5.2.230105 pdf2docx-0.5.6 pillow-9.4.0 premailer-3.10.0 protobuf-3.20.3 pyclipper-1.3.0.post4 pycryptodome-3.17 pydub-0.25.1 python-docx-0.8.11 python-multipart-0.0.5 python-rapidjson-1.9 rapidfuzz-2.13.7 rarfile-4.0 replicate-0.4.0 requests-2.28.2 rfc3986-1.5.0 scipy-1.10.0 sniffio-1.3.0 starlette-0.22.0 tokenizers-0.13.2 transformers-4.26.0 tritonclient-2.22.0 types-pytz-2022.7.1.0 uc-micro-py-1.0.1 uvicorn-0.20.0 visualdl-2.5.0 websockets-10.4 x2paddle-1.4.0 zope.event-4.6 zope.interface-5.5.2
Screenshot 2023-01-29 at 12 52 43 PM

Import Errors

Now when I import from detextify I get an error.

from detextify.paddle_text_detector import PaddleTextDetector
from detextify.inpainter import LocalSDInpainter
from detextify.detextifier import Detextifier

Output:

Error: Can not import paddle core while this file exists: /usr/local/lib/python3.8/dist-packages/paddle/fluid/libpaddle.so
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-4-a2d059222da3>](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
----> 1 from detextify.paddle_text_detector import PaddleTextDetector
      2 from detextify.inpainter import LocalSDInpainter
      3 from detextify.detextifier import Detextifier

9 frames
[/usr/local/lib/python3.8/dist-packages/detextify/paddle_text_detector.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
      1 from detextify.text_detector import TextBox, TextDetector
----> 2 from paddleocr import PaddleOCR
      3 from typing import Sequence
      4 from PIL import Image
      5 

[/usr/local/lib/python3.8/dist-packages/paddleocr/__init__.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
---> 14 from .paddleocr import *
     15 
     16 __version__ = paddleocr.VERSION

[/usr/local/lib/python3.8/dist-packages/paddleocr/paddleocr.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     19 __dir__ = os.path.dirname(__file__)
     20 
---> 21 import paddle
     22 
     23 sys.path.append(os.path.join(__dir__, ''))

[/usr/local/lib/python3.8/dist-packages/paddle/__init__.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     23 
     24 from .batch import batch  # noqa: F401
---> 25 from .framework import monkey_patch_variable
     26 from .framework import monkey_patch_math_varbase
     27 

[/usr/local/lib/python3.8/dist-packages/paddle/framework/__init__.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     15 # TODO: import framework api under this directory
     16 
---> 17 from . import random  # noqa: F401
     18 from .random import seed  # noqa: F401
     19 from .framework import get_default_dtype  # noqa: F401

[/usr/local/lib/python3.8/dist-packages/paddle/framework/random.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     14 
     15 # TODO: define random api
---> 16 import paddle.fluid as fluid
     17 from paddle.fluid import core
     18 

[/usr/local/lib/python3.8/dist-packages/paddle/fluid/__init__.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     34 
     35 # import all class inside framework into fluid module
---> 36 from . import framework
     37 from .framework import *
     38 # import all class inside executor into fluid module

[/usr/local/lib/python3.8/dist-packages/paddle/fluid/framework.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
     35 from .proto import framework_pb2
     36 
---> 37 from . import core
     38 from . import unique_name
     39 import paddle.version as fluid_version

[/usr/local/lib/python3.8/dist-packages/paddle/fluid/core.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
    302             "Error: Your machine doesn't support AVX, but the installed PaddlePaddle is avx core, "
    303             "you should reinstall paddlepaddle with no-avx core.\n")
--> 304     raise e
    305 
    306 

[/usr/local/lib/python3.8/dist-packages/paddle/fluid/core.py](https://4wyf22wivzj-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20230126-060047-RC00_504788655#) in <module>
    247 
    248 try:
--> 249     from . import libpaddle
    250     if avx_supported() and not libpaddle.is_compiled_with_avx():
    251         sys.stderr.write(

ImportError: libcudart.so.10.2: cannot open shared object file: No such file or directory

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
azumukupoe commented 1 year ago

Were you able to resolve?

I installed: pip install detextify

and I get this error: Traceback (most recent call last): File "C:\Users\James\Desktop\detextify\detextify.py", line 8, in from detextify.paddle_text_detector import PaddleTextDetector File "C:\Users\James\Desktop\detextify\detextify.py", line 8, in from detextify.paddle_text_detector import PaddleTextDetector ModuleNotFoundError: No module named 'detextify.paddle_text_detector'; 'detextify' is not a package

did you name your script detextify.py? change it to something like test.py

iuliaturc commented 1 year ago

Thanks @davisengeler for reporting this. The PaddleOCR library was causing a lot of trouble, so I replaced it with Tesseract. Here's a working Colab notebook.

davisengeler commented 1 year ago

@iuliaturc you're awesome, thanks! I’ll give it a shot soon.