@@ -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::
93102client.feedback(" nudity" ," safe" , " http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg" )
94103client.feedback(" type" ," illustration" , " http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg" )
95104client.feedback(" nudity" ," raw" , " http://img09.deviantart.net/2bd0/i/2009/276/c/9/magic_forrest_wallpaper_by_goergen.jpg" )
96- ```
0 commit comments