- pages/index.ts - The React frontend that renders the home page in the browser
- pages/api/predictions/index.ts - The backend API endpoint that calls Replicate's API to create a prediction
- pages/api/predictions/[id].ts - The backend API endpoint that calls Replicate's API to get the prediction result
Install dependencies:
pnpm install
Add your Replicate API token to .env.local
:
REPLICATE_API_TOKEN=<your-token-here>
Run the development server:
pnpm run dev
Open http://localhost:3000 with your browser.