Skip to content

Commit 6e6f6c5

Browse files
author
Grandiere Antoine
authored
Update README.MD
1 parent ba73a0c commit 6e6f6c5

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.MD

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,28 @@ Several moderation engines are available for you to choose from (nudity detectio
3030

3131
```python
3232
# Detect nudity in an image
33-
output = client.check('nudity').image('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
33+
output = client.check('nudity').set_url('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
3434

3535
# Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
36-
output = client.check('nudity', 'type', 'properties', 'wad', 'face').image('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
36+
output = client.check('nudity', 'type', 'properties', 'wad', 'face').set_url('http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg')
3737
```
3838

3939
## Moderate a local image:
4040
```python
4141
# Detect nudity in an image
42-
output = client.check('nudity').image('/full/path/to/image.jpg')
42+
output = client.check('nudity').set_file('/full/path/to/image.jpg')
4343

4444
# Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
45-
output = client.check('nudity', 'type', 'properties', 'wad', 'face').image('/full/path/to/image.jpg')
45+
output = client.check('nudity', 'type', 'properties', 'wad', 'face').set_file('/full/path/to/image.jpg')
46+
```
47+
48+
## Moderate a binary image:
49+
```python
50+
# Detect nudity in an image
51+
output = client.check('nudity').set_bytes(binary_image)
52+
53+
# Detect nudity, weapons, alcohol, drugs and faces in an image, along with image properties and type
54+
output = client.check('nudity', 'type', 'properties', 'wad', 'face').set_bytes(binary_image)
4655
```
4756

4857
# Video and Stream Moderation
@@ -93,4 +102,3 @@ Example of feedback through a public URL::
93102
client.feedback("nudity","safe", "http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg")
94103
client.feedback("type","illustration", "http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg")
95104
client.feedback("nudity","raw", "http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg")
96-
```

0 commit comments

Comments
 (0)