Пример #1
0
 def test_embed_one_image(self):
     image_url = 'https://samples.clarifai.com/toddler-flowers.jpeg'
     api = ClarifaiApi()
     try:
         response = api.embed_image_urls(image_url)
         self.assertTrue(response)
         self.assertTrue(response['results'][0]['url'] == image_url)
     except ApiError as e:  # User does not have permission.
         self.check_unauth(e)
Пример #2
0
 def test_embed_one_image(self):
     image_url = 'http://clarifai-img.s3.amazonaws.com/test/toddler-flowers.jpeg'
     api = ClarifaiApi()
     response = api.embed_image_urls(image_url)
     self.assertTrue(response)
     self.assertTrue(response['results'][0]['url'] == image_url)