You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* rm __pycache__
* gitignore __pycache__
* gitignore dist
* Upd usearch in image-search example
* Upd usearch in image-search example
* Implement ZSL in clip lib
* Use new ZSL API in examples
* Expose ZSL in Python
* Upd readme in Python bindings
* Bump version in Python bindings
-**Description**: Zero-shot labels an image with given candidate labels, returning a tuple of sorted scores and indices.
171
+
-`image_path` (str): The path to the image file to be labelled.
172
+
-`labels` (List[str]): A list of candidate labels to be scored.
173
+
-`n_threads` (int, optional): The number of CPU threads to use for encoding (default is the number of CPU cores).
174
+
175
+
#### 9. `__del__`
163
176
164
177
```python
165
178
def__del__(self):
@@ -175,17 +188,19 @@ A basic example can be found in the [clip.cpp examples](https://github.com/monat
175
188
176
189
```
177
190
python example_main.py --help
178
-
usage: clip [-h] -m MODEL [-v VERBOSITY] -t TEXT -i IMAGE
179
-
180
-
optional arguments:
181
-
-h, --help show this help message and exit
182
-
-m MODEL, --model MODEL
183
-
path to GGML file
184
-
-v VERBOSITY, --verbosity VERBOSITY
185
-
Level of verbosity. 0 = minimum, 2 = maximum
186
-
-t TEXT, --text TEXT text to encode
187
-
-i IMAGE, --image IMAGE
188
-
path to an image file
189
-
```
191
+
usage: clip [-h] -m MODEL [-fn FILENAME] [-v VERBOSITY] -t TEXT [TEXT ...] -i IMAGE
192
+
193
+
optional arguments:
194
+
-h, --help show this help message and exit
195
+
-m MODEL, --model MODEL
196
+
path to GGML file or repo_id
197
+
-fn FILENAME, --filename FILENAME
198
+
path to GGML file in the Hugging face repo
199
+
-v VERBOSITY, --verbosity VERBOSITY
200
+
Level of verbosity. 0 = minimum, 2 = maximum
201
+
-t TEXT [TEXT ...], --text TEXT [TEXT ...]
202
+
text to encode. Multiple values allowed. In this case, apply zero-shot labeling
203
+
-i IMAGE, --image IMAGE
204
+
path to an image file
205
+
``````
190
206
191
-
Bindings to the DLL are implemented in `clip_cpp/clip.py` and
0 commit comments