https://github.com/antoinewg/draw-your-dream
Prompt a text that will generate an image
https://github.com/antoinewg/draw-your-dream
ai nextjs replicate stable-diffusion typescript
Last synced: 8 months ago
JSON representation
Prompt a text that will generate an image
- Host: GitHub
- URL: https://github.com/antoinewg/draw-your-dream
- Owner: antoinewg
- Created: 2023-02-26T10:40:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-06T10:45:27.000Z (over 2 years ago)
- Last Synced: 2024-06-11T19:20:43.920Z (over 1 year ago)
- Topics: ai, nextjs, replicate, stable-diffusion, typescript
- Language: TypeScript
- Homepage: https://draw-your-dream.vercel.app/
- Size: 173 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Draw you dream 🦚
## Noteworthy files
- [pages/index.ts](pages/index.ts) - The React frontend that renders the home page in the browser
- [pages/api/predictions/index.ts](pages/api/predictions/index.ts) - The backend API endpoint that calls Replicate's API to create a prediction
- [pages/api/predictions/[id].ts](pages/api/predictions/[id].ts) - The backend API endpoint that calls Replicate's API to get the prediction result## Usage
Install dependencies:
```console
pnpm install
```Add your [Replicate API token](https://replicate.com/account#token) to `.env.local`:
```
REPLICATE_API_TOKEN=
```Run the development server:
```console
pnpm run dev
```Open [http://localhost:3000](http://localhost:3000) with your browser.
[Source](https://replicate.com/docs/get-started/nextjs)