p1atdev commited on
Commit
eb6a0b5
1 Parent(s): 80a030b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -5
README.md CHANGED
@@ -25,17 +25,25 @@ It achieves the following results on the evaluation set:
25
  This model is an experimental model that predicts danbooru tags of images.
26
 
27
  ## Example
 
 
 
28
  ```py
29
  from transformers import pipeline
30
- pipe = pipeline("image-classification",model="p1atdev/siglip-tagger-test-3",revision="refs/pr/2",trust_remote_code=True)
31
- pipe("image.jpg", # takes str(path) or numpy array or PIL images as input
32
- threshold=0.5, #optional parameter defaults to 0
33
- return_scores = False #optional parameter defaults to False
34
- )
 
 
35
  ```
 
36
  * `threshold`: confidence intervale, if it's specified, the pipeline will only return tags with a confidence >= threshold
37
  * `return_scores`: if specified the pipeline will return the labels and their confidences in a dictionary format.
38
 
 
 
39
  ```py
40
  from PIL import Image
41
  import torch
 
25
  This model is an experimental model that predicts danbooru tags of images.
26
 
27
  ## Example
28
+
29
+ ### Use a pipeline
30
+
31
  ```py
32
  from transformers import pipeline
33
+
34
+ pipe = pipeline("image-classification", model="p1atdev/siglip-tagger-test-3", trust_remote_code=True)
35
+ pipe(
36
+ "image.jpg", # takes str(path) or numpy array or PIL images as input
37
+ threshold=0.5, #optional parameter defaults to 0
38
+ return_scores = False #optional parameter defaults to False
39
+ )
40
  ```
41
+
42
  * `threshold`: confidence intervale, if it's specified, the pipeline will only return tags with a confidence >= threshold
43
  * `return_scores`: if specified the pipeline will return the labels and their confidences in a dictionary format.
44
 
45
+ ### Load model directly
46
+
47
  ```py
48
  from PIL import Image
49
  import torch