Instructions to use Gflorent/clip-text-feature-extraction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gflorent/clip-text-feature-extraction with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Gflorent/clip-text-feature-extraction")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Gflorent/clip-text-feature-extraction", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update pipeline.py
Browse files- pipeline.py +3 -3
pipeline.py
CHANGED
|
@@ -12,9 +12,9 @@ class PreTrainedPipeline():
|
|
| 12 |
"""
|
| 13 |
Initialize model
|
| 14 |
"""
|
| 15 |
-
self.model = CLIPModel.from_pretrained(
|
| 16 |
-
self.processor = CLIPProcessor.from_pretrained(
|
| 17 |
-
self.tokenizer = CLIPTokenizer.from_pretrained(
|
| 18 |
|
| 19 |
def __call__(self, inputs: str):
|
| 20 |
"""
|
|
|
|
| 12 |
"""
|
| 13 |
Initialize model
|
| 14 |
"""
|
| 15 |
+
self.model = CLIPModel.from_pretrained(path)
|
| 16 |
+
self.processor = CLIPProcessor.from_pretrained(path)
|
| 17 |
+
self.tokenizer = CLIPTokenizer.from_pretrained(path)
|
| 18 |
|
| 19 |
def __call__(self, inputs: str):
|
| 20 |
"""
|