Python
From your terminal, run:
pip3 install banana-dev
We assume you installed version >=5.0.0
from banana_dev import Client
# Create a reference to your model on Banana
my_model = Client(
api_key="YOUR_API_KEY", # Found in dashboard
model_key="YOUR_MODEL_KEY", # Found in model view in dashboard
url="https://YOUR_URL.run.banana.dev", # Found in model view in dashboard
)
# Specify the model's input JSON
inputs = {
"prompt": "In the summer I like [MASK].",
}
# Call your model's inference endpoint on Banana
result, meta = my_model.call("/", inputs)
print(result)
Last modified 2mo ago