Better method to ensure latest CLIP Interrogator library version is installed.

This commit is contained in:
pharmapsychotic
2023-02-20 16:57:45 -06:00
parent 187cffe463
commit ef14e99302
3 changed files with 15 additions and 2 deletions

14
install.py Normal file
View File

@@ -0,0 +1,14 @@
import launch
CI_VERSION = "0.5.4"
needs_install = False
try:
import clip_interrogator
if clip_interrogator.__version__ != CI_VERSION:
needs_install = True
except ImportError:
needs_install = True
if needs_install:
launch.run_pip(f"install clip-interrogator=={CI_VERSION}", "requirements for CLIP Interrogator")