More Complex Examples
Last updated
Last updated
With Sparkable you are not limited to simple applications, more complicated examples are possible with a little bit or prompt engineering.
Let's create an application that can detect possible skin diseases from an image. Sounds complicated, but luckily there is a public API we can use that does the heavy lifting for us.
Our model isn't smart enough yet to fully understand how to use this API in our application...this is where a little bit of prompt magic comes into play.
By providing Sparkable with more detailed directions we can generate much more functional and useful applications. For this we'll need to create a set of instructions in a file that we can then upload to the chat input to create our application.
Providing the necessary information to the AI is important and this is why we create context files that help explain what we want.
In our case we need to explain how the API endpoint for this application works by providing instructions in the context file about the endpoint shape, parameters, request, and responses. We'll be using a document to allow different text formats to be parsed by the AI. (but you can also use a TXT
or XML
file)
Provide the AI a fully working API example
And now provide the response format and an example
Finally we'll provide a few additional notes about the image formatting we'll be providing
We're now ready to upload our context file to Sparkable and ask it to create the application. Let's use the following prompt to create our application.
Create a skin disease analyzer, use a dark theme, the image should have a preview, add some charts ams a cool visualization of the results
Here is the full text and a working demo of this example.
View the working application on Sparkable