From a8ecf52a387090d6636adbdfb35770fe927e7eec Mon Sep 17 00:00:00 2001 From: pharmapsychotic Date: Wed, 4 Jan 2023 13:03:14 -0600 Subject: [PATCH] . --- README.md | 5 +++-- clip_interrogator.ipynb | 8 ++------ requirements.txt | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index d2eaf3a..d9df433 100644 --- a/README.md +++ b/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 diff --git a/clip_interrogator.ipynb b/clip_interrogator.ipynb index 9c702b2..99bf7fe 100644 --- a/clip_interrogator.ipynb +++ b/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": { diff --git a/requirements.txt b/requirements.txt index 73b7fea..735e90b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,4 @@ torchvision Pillow requests tqdm -open_clip_torch -git+https://github.com/pharmapsychotic/BLIP.git \ No newline at end of file +open_clip_torch \ No newline at end of file