Browse Source

Simplify install further

Big ups to @justindujardin for proper syntax to get git dependency into requirements in way that pip will accept it! :D
pull/34/merge
pharmapsychotic 2 years ago
parent
commit
55fe80c74c
  1. 7
      README.md
  2. 2
      clip_interrogator/__init__.py
  3. 3
      requirements.txt
  4. 2
      setup.py

7
README.md

@ -35,15 +35,14 @@ Install with PIP
# install torch with GPU support for example: # install torch with GPU support for example:
pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117 pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu117
# install clip-interrogator and blip # install clip-interrogator
pip install clip-interrogator==0.3.3 pip install clip-interrogator==0.3.4
pip install git+https://github.com/pharmapsychotic/BLIP.git
``` ```
You can then use it in your script You can then use it in your script
```python ```python
from PIL import Image from PIL import Image
from clip_interrogator import Interrogator, Config from clip_interrogator import Config, Interrogator
image = Image.open(image_path).convert('RGB') image = Image.open(image_path).convert('RGB')
ci = Interrogator(Config(clip_model_name="ViT-L-14/openai")) ci = Interrogator(Config(clip_model_name="ViT-L-14/openai"))
print(ci.interrogate(image)) print(ci.interrogate(image))

2
clip_interrogator/__init__.py

@ -1,4 +1,4 @@
from .clip_interrogator import Interrogator, Config from .clip_interrogator import Interrogator, Config
__version__ = '0.3.3' __version__ = '0.3.4'
__author__ = 'pharmapsychotic' __author__ = 'pharmapsychotic'

3
requirements.txt

@ -3,4 +3,5 @@ torchvision
Pillow Pillow
requests requests
tqdm tqdm
open_clip_torch open_clip_torch
blip @ git+https://github.com/pharmapsychotic/BLIP.git

2
setup.py

@ -5,7 +5,7 @@ from setuptools import setup, find_packages
setup( setup(
name="clip-interrogator", name="clip-interrogator",
version="0.3.3", version="0.3.4",
license='MIT', license='MIT',
author='pharmapsychotic', author='pharmapsychotic',
author_email='me@pharmapsychotic.com', author_email='me@pharmapsychotic.com',

Loading…
Cancel
Save