Hello World

Welcome! This is a step-by-step beginner guide for building on Banana.
By the end of this guide, you'll have a custom BERT model deployed to Banana's servers.
We'll be using Banana's open-source framework, Potassium, as the backend in this beginner guide.
Install the Banana CLI with pip. The CLI helps us build and test Potassium apps.
pip3 install banana-cli
Run the init command to create your Potassium app
banana init hello-world
cd hello-world
This downloads boilerplate and installs dependencies.
Your directory will now contain these files:
A freshly created potassium project runs a Huggingface BERT model, for sake of example.

Finally, let's start our dev server!

banana dev
You should see:
Starting server 🍌
Running init()
Serving on http://localhost:8000
Now open up a different terminal and hit the server with a simple CURL POST request
curl -X POST -H "Content-Type: application/json" -d '{"prompt": "Hello I am a [MASK] model."}' http://localhost:8000/
And boom
you've ran an inference on a BERT model
"outputs": {
"score": 0.13177461922168732,
"sequence": "hello i am a fashion model.",
"token": 4827,
"token_str": "fashion"
In the next page, we'll learn how Potassium apps work.
Last modified 1mo ago