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(model, processor) image = load_sample_ct() pipeline(image, ["No lung nodules", "Lung nodules"])
- Notebooks
- Google Colab
- Kaggle
Add tox config
Browse files
tox.ini
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[tox]
|
| 2 |
+
requires =
|
| 3 |
+
tox>=4.22
|
| 4 |
+
tox-uv>=1.13
|
| 5 |
+
env_list =
|
| 6 |
+
py310
|
| 7 |
+
py311
|
| 8 |
+
py312
|
| 9 |
+
py313
|
| 10 |
+
py314
|
| 11 |
+
lint
|
| 12 |
+
format
|
| 13 |
+
typecheck
|
| 14 |
+
|
| 15 |
+
[testenv]
|
| 16 |
+
description = Run the test suite with pytest
|
| 17 |
+
runner = uv-venv-lock-runner
|
| 18 |
+
dependency_groups = dev
|
| 19 |
+
commands =
|
| 20 |
+
pytest {posargs}
|
| 21 |
+
|
| 22 |
+
[testenv:lint]
|
| 23 |
+
description = Lint the code with ruff
|
| 24 |
+
runner = uv-venv-runner
|
| 25 |
+
skip_install = true
|
| 26 |
+
dependency_groups =
|
| 27 |
+
deps =
|
| 28 |
+
ruff
|
| 29 |
+
commands =
|
| 30 |
+
ruff check src tests
|
| 31 |
+
|
| 32 |
+
[testenv:format]
|
| 33 |
+
description = Check formatting with ruff
|
| 34 |
+
runner = uv-venv-runner
|
| 35 |
+
skip_install = true
|
| 36 |
+
dependency_groups =
|
| 37 |
+
deps =
|
| 38 |
+
ruff
|
| 39 |
+
commands =
|
| 40 |
+
ruff format --check src tests
|
| 41 |
+
|
| 42 |
+
[testenv:typecheck]
|
| 43 |
+
description = Type-check the code with ty
|
| 44 |
+
dependency_groups =
|
| 45 |
+
types
|
| 46 |
+
commands =
|
| 47 |
+
ty check src
|