diff --git a/clip_interrogator.ipynb b/clip_interrogator.ipynb index 17a6e46..9c81f51 100644 --- a/clip_interrogator.ipynb +++ b/clip_interrogator.ipynb @@ -45,7 +45,7 @@ " install_cmds = [\n", " ['pip', 'install', 'gradio'],\n", " ['pip', 'install', 'open_clip_torch'],\n", - " ['pip', 'install', '-e', 'git+https://github.com/pharmapsychotic/BLIP.git@lib#egg=blip'],\n", + " ['pip', 'install', 'git+https://github.com/pharmapsychotic/BLIP.git'],\n", " ['git', 'clone', '-b', 'negative', 'https://github.com/pharmapsychotic/clip-interrogator.git']\n", " ]\n", " for cmd in install_cmds:\n", @@ -75,6 +75,8 @@ "for url in CACHE_URLS:\n", " print(subprocess.run(['wget', url, '-P', 'cache'], stdout=subprocess.PIPE).stdout.decode('utf-8'))\n", "\n", + "import sys\n", + "sys.path.append('clip-interrogator')\n", "\n", "import gradio as gr\n", "from clip_interrogator import Config, Interrogator\n", @@ -102,7 +104,7 @@ " flaves = flaves + ci.negative.labels\n", " prompt = ci.chain(image_features, flaves, max_count=32, reverse=True, desc=\"Negative chain\")\n", " sim = ci.similarity(ci.image_to_features(image), prompt)\n", - " return prompt, sim\n" + " return prompt, sim" ] }, { @@ -259,7 +261,7 @@ "provenance": [] }, "kernelspec": { - "display_name": "Python 3.7.15 ('py37')", + "display_name": "ci", "language": "python", "name": "python3" }, @@ -273,12 +275,12 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.15 (default, Nov 24 2022, 18:44:54) [MSC v.1916 64 bit (AMD64)]" + "version": "3.8.10 (default, Nov 14 2022, 12:59:47) \n[GCC 9.4.0]" }, "orig_nbformat": 4, "vscode": { "interpreter": { - "hash": "1f51d5616d3bc2b87a82685314c5be1ec9a49b6e0cb1f707bfa2acb6c45f3e5f" + "hash": "90daa5087f97972f35e673cab20894a33c1e0ca77092ccdd163e60b53596983a" } } },