This repository includes full working samples for invoking the inference APIs supported by Tiyaro in multiple languages. The samples are all self explanatory and are organized by the various ML model types.
We have curated the open source community, model hubs and popular AI vendors to make sure you have access to the best AI models. Each model in the Tiyaro universe has its own API URL.
For example
Model | API URL |
---|---|
imagenet/inception_resnet_v2 | https://api.tiyaro.ai/v1/ent/google/5/imagenet/inception_resnet_v2/classification |
gpt2 | https://api.tiyaro.ai/v1/ent/huggingface/1/gpt2 |
gcpvision-object-detection | https://api.tiyaro.ai/v1/ent/gcp/1/gcpvision-object-detection |
Models are further classified into different types based on their function.
For example, all the following models are 'image-classification' type models
Model | Model Type |
---|---|
mobilenet_v3_large | image-classification |
rekognition-image-classification | image-classification |
efficientnet/b5 | image-classification |
You can find the type of any model from the model card in Tiyaro.
For example here is the model card for the model mobilenet_v3_large
And here is where to find the type (image-classification) of the model
You can search for models in the Tiyaro console using the model explorer. After you find the model of your choice, you can locate the 'model type' of that models as shown above. This repo is organized by 'model types'. So once you have your model type you navigate to the right subdir of the langauage of your choice to find the sample that you can adapt for your use.
For example, the python sample that you can adapt for mobilenet_v3_large model is in python/image-classification and java sample is in java/image-classification.
Similarly, the python sample that you can adapt for gpt2 which is of model type text-generation is in python/text-generation and java sample is in java/text-generation.
Where applicable an API can accept input data in multiple formats. For instance all vision APIs can accept either a image URL or the image in base64 format. For such APIs you will find separated samples for each type of input. The code to convert an image or audio file into base64 format is included in the samples.
For example, the python sample for using a local image and coverting it into a base64 image for image-classification is in python/image-classification/local_image_input.py and java sample is in java/image-classification/LocalImageInput.java.
Similarly the sample for using an image URL is in python/image-classification/url_input.py and java sample is in java/image-classification/URLInput.java.
gcp and rekognition classes are organized under python/gcp_classes and python/rekognition_classes accordingly.