Created
April 8, 2018 07:18
-
-
Save kunal732/0560822d3005f1b2578ab8137bb0da52 to your computer and use it in GitHub Desktop.
Calling the Clarifai Celebrity model.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from clarifai.rest import ClarifaiApp | |
from clarifai.rest import Image as ClImage | |
#put api key | |
app = ClarifaiApp(api_key='') | |
model = app.models.get('celeb-v1.3') | |
#put photo url below | |
image = ClImage(url='') | |
response = model.predict([image]) | |
celeb_concepts = response['outputs'][0]['data']['regions'][0]['data']['face']['identity']['concepts'] | |
for concept in celeb_concepts: | |
print(concept['name'], concept['value']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment