Browse Source

.

pull/34/head
pharmapsychotic 2 years ago
parent
commit
a8ecf52a38
  1. 5
      README.md
  2. 8
      clip_interrogator.ipynb
  3. 1
      requirements.txt

5
README.md

@ -33,10 +33,11 @@ python3 -m venv ci_env
Install with PIP
```
# install torch with GPU support for example:
pip3 install torch torchvision torchaudio --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
# install clip-interrogator and blip
pip install clip-interrogator==0.3.3
pip install git+https://github.com/pharmapsychotic/BLIP.git
```
You can then use it in your script

8
clip_interrogator.ipynb

@ -55,8 +55,8 @@
" install_cmds = [\n",
" ['pip', 'install', 'gradio'],\n",
" ['pip', 'install', 'open_clip_torch'],\n",
" ['pip', 'install', 'clip-interrogator'],\n",
" ['pip', 'install', 'git+https://github.com/pharmapsychotic/BLIP.git'],\n",
" ['git', 'clone', 'https://github.com/pharmapsychotic/clip-interrogator.git']\n",
" ]\n",
" for cmd in install_cmds:\n",
" print(subprocess.run(cmd, stdout=subprocess.PIPE).stdout.decode('utf-8'))\n",
@ -86,10 +86,6 @@
" print(subprocess.run(['wget', url, '-P', 'cache'], stdout=subprocess.PIPE).stdout.decode('utf-8'))\n",
"\n",
"\n",
"import sys\n",
"sys.path.append('src/blip')\n",
"sys.path.append('clip-interrogator')\n",
"\n",
"import gradio as gr\n",
"from clip_interrogator import Config, Interrogator\n",
"\n",
@ -279,7 +275,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.15"
"version": "3.7.15 (default, Nov 24 2022, 18:44:54) [MSC v.1916 64 bit (AMD64)]"
},
"orig_nbformat": 4,
"vscode": {

1
requirements.txt

@ -4,4 +4,3 @@ Pillow
requests
tqdm
open_clip_torch
git+https://github.com/pharmapsychotic/BLIP.git
Loading…
Cancel
Save