Created
December 17, 2018 10:56
-
-
Save ShanikaNishadhi/c48701a44f740a812571846b5994548e to your computer and use it in GitHub Desktop.
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 | |
app = ClarifaiApp(api_key='4545a210c81b421a8e1282201a175a7d') | |
img1 = ClImage(file_obj=open('DogImages/dog1.jpg', 'rb'),concepts=['dogs']) | |
img2 = ClImage(file_obj=open('DogImages/dog2.jpg', 'rb'),concepts=['dogs']) | |
img3 = ClImage(file_obj=open('DogImages/dog3.jpg', 'rb'),concepts=['dogs']) | |
img4 = ClImage(file_obj=open('DogImages/dog4.jpg', 'rb'),concepts=['dogs']) | |
img5 = ClImage(file_obj=open('DogImages/dog5.jpg', 'rb'),concepts=['dogs']) | |
img6 = ClImage(file_obj=open('DogImages/dog6.jpg', 'rb'),concepts=['dogs']) | |
img7 = ClImage(file_obj=open('DogImages/dog7.jpg', 'rb'),concepts=['dogs']) | |
img8 = ClImage(file_obj=open('DogImages/dog8.jpg', 'rb'),concepts=['dogs']) | |
img9 = ClImage(file_obj=open('DogImages/dog9.jpg', 'rb'),concepts=['dogs']) | |
img10 = ClImage(file_obj=open('DogImages/dog10.jpg', 'rb'),concepts=['dogs']) | |
img11 = ClImage(file_obj=open('CatImages/cat1.jpg', 'rb'),concepts=['cats']) | |
img12 = ClImage(file_obj=open('CatImages/cat2.jpg', 'rb'),concepts=['cats']) | |
img13 = ClImage(file_obj=open('CatImages/cat3.jpg', 'rb'),concepts=['cats']) | |
img14 = ClImage(file_obj=open('CatImages/cat4.jpg', 'rb'),concepts=['cats']) | |
img15 = ClImage(file_obj=open('CatImages/cat5.jpg', 'rb'),concepts=['cats']) | |
img16 = ClImage(file_obj=open('CatImages/cat6.jpg', 'rb'),concepts=['cats']) | |
img17 = ClImage(file_obj=open('CatImages/cat7.jpg', 'rb'),concepts=['cats']) | |
img18 = ClImage(file_obj=open('CatImages/cat8.jpg', 'rb'),concepts=['cats']) | |
img19 = ClImage(file_obj=open('CatImages/cat9.jpg', 'rb'),concepts=['cats']) | |
img20 = ClImage(file_obj=open('CatImages/cat10.jpg', 'rb'),concepts=['cats']) | |
app.inputs.bulk_create_images([img1, img2, img3, img4, img5, img6, img7, img8, img9, img10, img11, img12, img13, img14, | |
img15, img16, img17,img18, img19, img20]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment