Instructions to use microsoft/colipri with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- COLIPRI
How to use microsoft/colipri with COLIPRI:
pip install colipri
from colipri import get_model from colipri import get_processor from colipri import load_sample_ct from colipri import ZeroShotImageClassificationPipeline model = get_model().cuda() processor = get_processor() pipeline = ZeroShotImageClassificationPipeline("microsoft/colipri", processor) image = load_sample_ct() pipeline(image, ["No lung nodules", "Lung nodules"]) - Notebooks
- Google Colab
- Kaggle
Fix prompts and update scores
Browse files- COLIPRI_demo.ipynb +0 -0
- README.md +2 -2
- pyproject.toml +1 -0
- uv.lock +11 -0
COLIPRI_demo.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
CHANGED
|
@@ -91,8 +91,8 @@ Now, let's instantiate the model and processor.
|
|
| 91 |
>>> pipeline = ZeroShotImageClassificationPipeline(model, processor)
|
| 92 |
>>> pipeline(image, ["No lung nodules", "Lung nodules"])
|
| 93 |
[
|
| 94 |
-
{'score': 0.
|
| 95 |
-
{'score': 0.
|
| 96 |
]
|
| 97 |
```
|
| 98 |
|
|
|
|
| 91 |
>>> pipeline = ZeroShotImageClassificationPipeline(model, processor)
|
| 92 |
>>> pipeline(image, ["No lung nodules", "Lung nodules"])
|
| 93 |
[
|
| 94 |
+
{'score': 0.0007, 'label': 'No lung nodules'},
|
| 95 |
+
{'score': 0.9993, 'label': 'Lung nodules'}
|
| 96 |
]
|
| 97 |
```
|
| 98 |
|
pyproject.toml
CHANGED
|
@@ -39,6 +39,7 @@ demo = [
|
|
| 39 |
dev = [
|
| 40 |
"ipykernel",
|
| 41 |
"ipywidgets",
|
|
|
|
| 42 |
"pytest-sugar>=1.1.1",
|
| 43 |
]
|
| 44 |
maintain = [
|
|
|
|
| 39 |
dev = [
|
| 40 |
"ipykernel",
|
| 41 |
"ipywidgets",
|
| 42 |
+
"pip>=26.1.2",
|
| 43 |
"pytest-sugar>=1.1.1",
|
| 44 |
]
|
| 45 |
maintain = [
|
uv.lock
CHANGED
|
@@ -299,6 +299,7 @@ demo = [
|
|
| 299 |
dev = [
|
| 300 |
{ name = "ipykernel" },
|
| 301 |
{ name = "ipywidgets" },
|
|
|
|
| 302 |
{ name = "pytest-sugar" },
|
| 303 |
]
|
| 304 |
maintain = [
|
|
@@ -332,6 +333,7 @@ provides-extras = ["demo"]
|
|
| 332 |
dev = [
|
| 333 |
{ name = "ipykernel" },
|
| 334 |
{ name = "ipywidgets" },
|
|
|
|
| 335 |
{ name = "pytest-sugar", specifier = ">=1.1.1" },
|
| 336 |
]
|
| 337 |
maintain = [{ name = "bump-my-version" }]
|
|
@@ -1820,6 +1822,15 @@ wheels = [
|
|
| 1820 |
{ url = "https://files.pythonhosted.org/packages/34/e7/ae39f538fd6844e982063c3a5e4598b8ced43b9633baa3a85ef33af8c05c/pillow-11.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c84d689db21a1c397d001aa08241044aa2069e7587b398c8cc63020390b1c1b8", size = 6984598, upload-time = "2025-07-01T09:16:27.732Z" },
|
| 1821 |
]
|
| 1822 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1823 |
[[package]]
|
| 1824 |
name = "platformdirs"
|
| 1825 |
version = "4.5.0"
|
|
|
|
| 299 |
dev = [
|
| 300 |
{ name = "ipykernel" },
|
| 301 |
{ name = "ipywidgets" },
|
| 302 |
+
{ name = "pip" },
|
| 303 |
{ name = "pytest-sugar" },
|
| 304 |
]
|
| 305 |
maintain = [
|
|
|
|
| 333 |
dev = [
|
| 334 |
{ name = "ipykernel" },
|
| 335 |
{ name = "ipywidgets" },
|
| 336 |
+
{ name = "pip", specifier = ">=26.1.2" },
|
| 337 |
{ name = "pytest-sugar", specifier = ">=1.1.1" },
|
| 338 |
]
|
| 339 |
maintain = [{ name = "bump-my-version" }]
|
|
|
|
| 1822 |
{ url = "https://files.pythonhosted.org/packages/34/e7/ae39f538fd6844e982063c3a5e4598b8ced43b9633baa3a85ef33af8c05c/pillow-11.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:c84d689db21a1c397d001aa08241044aa2069e7587b398c8cc63020390b1c1b8", size = 6984598, upload-time = "2025-07-01T09:16:27.732Z" },
|
| 1823 |
]
|
| 1824 |
|
| 1825 |
+
[[package]]
|
| 1826 |
+
name = "pip"
|
| 1827 |
+
version = "26.1.2"
|
| 1828 |
+
source = { registry = "https://pypi.org/simple" }
|
| 1829 |
+
sdist = { url = "https://files.pythonhosted.org/packages/01/91/47e7d486260f618783899587af63ccf7980fb60245c3e63dd4571c6b57ad/pip-26.1.2.tar.gz", hash = "sha256:f49cd134c61cf2fd75e0ce2676db03e4054504a5a4986d00f8299ae632dc4605", size = 1840799, upload-time = "2026-05-31T17:33:58.56Z" }
|
| 1830 |
+
wheels = [
|
| 1831 |
+
{ url = "https://files.pythonhosted.org/packages/5d/95/6b5cb3461ea5673ba0995989746db58eb18b91b54dbf331e72f569540946/pip-26.1.2-py3-none-any.whl", hash = "sha256:382ff9f685ee3bc25864f820aa50505825f10f5458ffff07e30a6d96e5715cab", size = 1813144, upload-time = "2026-05-31T17:33:56.772Z" },
|
| 1832 |
+
]
|
| 1833 |
+
|
| 1834 |
[[package]]
|
| 1835 |
name = "platformdirs"
|
| 1836 |
version = "4.5.0"
|