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
Update demo and README
Browse files- COLIPRI_demo.ipynb +0 -0
- README.md +3 -3
COLIPRI_demo.ipynb
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
CHANGED
|
@@ -89,10 +89,10 @@ Now, let's instantiate the model and processor.
|
|
| 89 |
```python
|
| 90 |
>>> from colipri import ZeroShotImageClassificationPipeline
|
| 91 |
>>> pipeline = ZeroShotImageClassificationPipeline(model, processor)
|
| 92 |
-
>>> pipeline(image, ["No lung nodules", "Lung nodules"])
|
| 93 |
[
|
| 94 |
-
{'score': 0.
|
| 95 |
-
{'score': 0.
|
| 96 |
]
|
| 97 |
```
|
| 98 |
|
|
|
|
| 89 |
```python
|
| 90 |
>>> from colipri import ZeroShotImageClassificationPipeline
|
| 91 |
>>> pipeline = ZeroShotImageClassificationPipeline(model, processor)
|
| 92 |
+
>>> pipeline(image, ["No lung nodules present", "Lung nodules present"])
|
| 93 |
[
|
| 94 |
+
{'score': 0.0002, 'label': 'No lung nodules present'},
|
| 95 |
+
{'score': 0.9998, 'label': 'Lung nodules present'}
|
| 96 |
]
|
| 97 |
```
|
| 98 |
|