This is a Next.js template project that's preconfigured to work with Banana's API.
You can use this as a quick jumping-off point to build a web app using Banana's API
- pages/index.js - The React frontend that renders the home page in the browser
- pages/api/banana.js - The backend API endpoint that calls Banana's API to create a prediction
Install dependencies(npm install):
npm i
Add your model's Banana API keys to .env.local
:
BANANA_API_KEY = <your_api_key_here>
BANANA_MODEL_KEY = <your_model_key_here>
Run the development server:
npm run dev
Open http://localhost:3000 with your browser.