I was making an Android Studio app and I need help integrating Clarifai in it. I started by setting up the client as per the Quick Start-Up Guide on Clarifai website. My code looks something like this:
public static void main(String[] arg) {
new ClarifaiBuilder("c719daa395fe42f2a1385ace59592496").buildSync();
ClarifaiClient client = new ClarifaiBuilder("c719daa395fe42f2a1385ace59592496")
.client(new OkHttpClient()) // OPTIONAL. Allows customization of OkHttp by the user
.buildSync();
client.getDefaultModels().generalModel().predict()
.withInputs(ClarifaiInput.forImage("https://samples.clarifai.com/metro-north.jpg"))
.executeSync();
}
From what I understand it is taking the sample image metro-north and predicting what it is. What I want to know is how you could write/print the top result (or the list of results either works) on a screen in your app so it is visible.
If someone could help me with this problem I would greatly appreciate it :D