Skip to main content

The banana package is a python client to interact with your machine learning models hosted on Banana

Project description

Banana Python SDK

Getting Started

Install via pip

pip3 install banana-dev

If integration testing against a local Potassium server:

export BANANA_SERVER=local

to call http://localhost:8000/ directly. Be sure to unset in prod!

If deploying to prod: Sign in / log in here to get your API and Model Keys

Run:

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

banana_dev-5.0.2.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

banana_dev-5.0.2-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page