Create the Visualforce Page
Create the Visualforce Page
Now you create the Visualforce page that calls the classes that you just created and
displays the prediction results.
- In Salesforce, from Setup, enter Visualforce in the Quick Find box, then select Visualforce Pages.
- Click New.
-
For Label, type Predict.
The Name field automatically populates based on this entry.
-
From README.md, copy all of the code from
<apex:page
Controller="VisionController"> to </apex:page> and paste it in the Visualforce Markup tab.
- Click Save.
Test the Visualforce Page
The time has come to test out all your hard work. To refresh your memory, you run the
code you created, and that code calls the Einstein Image Classification API. The code sends
the image of the tree frog to the general image classifier (by referencing the image URL),
and returns a prediction.
-
From the Visualforce page you created, click Preview.
Your page shows the prediction results from the general image classifier, and
the classifier is pretty sure it’s a picture of a tree frog. If you don’t see
any prediction results, ensure that you verified your Einstein Platform Services
account. Check your email for a link to verify your new account.
Congratulations! You just called the Einstein Image Classification API, sent an
image into an existing model, and received a prediction back from the model.