An open API service indexing awesome lists of open source software.

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

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.

app screenshot

[Source](https://replicate.com/docs/get-started/nextjs)