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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for banana_dev-5.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2b71754e1eb2b4242ce8739da389785f3023a167d89d7155f400cdf95758510 |
|
MD5 | 71550690854f6833ab6a6355a607ab08 |
|
BLAKE2b-256 | 9cc8fe5cb5d5a7c181b585b7d3c71d3785e45360120bd83e8b19688e18da511c |