Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
model-index:
|
3 |
+
- name: adult-content-classifier-image
|
4 |
+
results: []
|
5 |
+
pipeline_tag: image-classification
|
6 |
---
|
7 |
+
<!-- This model card has been generated automatically according to the information Keras had access to. You should
|
8 |
+
probably proofread and complete it, then remove this comment. -->
|
9 |
+
|
10 |
+
# use transformers pipeline
|
11 |
+
```python
|
12 |
+
from transformers import pipeline
|
13 |
+
pipe = pipeline("image-classification", model="jiechau/adult-content-classifier")
|
14 |
+
q = 'https://down-tw.img.susercontent.com/file/tw-50009109-51d719155810219f31e6b78cea0069e4' # regular
|
15 |
+
q = 'https://down-tw.img.susercontent.com/file/sg-11134201-22110-oj27i2gyi8jvc2' # adult
|
16 |
+
result = pipe(q)
|
17 |
+
print(result)
|
18 |
+
# [{'label': 'adult_成人商品', 'score': 0.7516837120056152}, {'label': 'regular_一般商品', 'score': 0.2475457787513733}, {'label': 'unknown', 'score': 0.0007705678581260145}]
|
19 |
+
```
|