Skip to content

Commit

Permalink
dependency cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
doberst committed Dec 14, 2023
1 parent c974df9 commit 487855b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
3 changes: 0 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ Open-Source dependencies for the llmware package:
* Software: libzip (https://libzip.org/)
* Software: lxml (https://github.com/lxml/lxml)
* Software: numpy (https://github.com/numpy/numpy)
* Software: pandas (https://github.com/pandas-dev/pandas)
* Software: scikit-learn (https://github.com/scikit-learn/scikit-learn)
* Software: scipy (https://github.com/scipy/scipy)
* Software: torch (https://github.com/pytorch/pytorch)
* Software: Werkzeug (https://github.com/pallets/werkzeug/)

Expand Down
12 changes: 10 additions & 2 deletions llmware/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
import requests
from bs4 import BeautifulSoup
from urllib.request import urlopen, Request
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS

import pytesseract
from pytesseract.pytesseract import TesseractNotFoundError
from pdf2image import convert_from_path
Expand Down Expand Up @@ -2937,6 +2936,15 @@ def exif_extractor(self, fp):
exif_table = {}
creator_device = {}
time_stamps = {}

# PIL/Pillow required for EXIF image processing - must be installed separately

try:
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS

except:
raise DependencyNotInstalledException("PIL")

try:
img = Image.open(fp)
Expand Down
4 changes: 1 addition & 3 deletions llmware/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ datasets==2.15.0
faiss-cpu==1.7.4
huggingface-hub==0.19.4
lxml==4.9.3
numpy==1.23.2
numpy>=1.23.2
openai==0.27.7
pdf2image==1.16.0
Pillow==10.0.1
pymilvus==2.3.0
pymongo==4.5.0
pytesseract==0.3.10
scipy==1.11.2
sentence-transformers==2.2.2
tabulate==0.9.0
tokenizers==0.15.0
Expand Down
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,12 @@ def glob_fix(package_name, glob):
'faiss-cpu==1.7.4',
'huggingface-hub==0.19.4',
'lxml==4.9.3',
'numpy==1.23.2',
'numpy>=1.23.2',
'openai==0.27.7',
'pandas==2.1.1',
'pdf2image==1.16.0',
'Pillow==10.0.1',
'pymilvus==2.3.0',
'pymongo==4.5.0',
'pytesseract==0.3.10',
'python-on-whales==0.64.3',
'scipy==1.11.2',
'scikit-learn==1.3.1',
'sentence-transformers==2.2.2',
'tabulate==0.9.0',
'tokenizers>=0.15.0',
Expand Down

0 comments on commit 487855b

Please sign in to comment.