AI prompts
base on An open-source AI avatar generator web app - https://photoshot.app # Photoshot
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/photoshot_ai.svg?style=social&label=Follow%20%40photoshot_ai)](https://twitter.com/photoshot_ai)
[![photobooth-ai.app](https://github.com/baptadn/photoshot/assets/1102595/3636614d-67f3-45a8-8c11-4b9271540725)](https://photobooth-ai.app/)
An open-source AI avatar generator web app
[![Photoshot](https://photoshot.app/og-cover.jpg)
](https://user-images.githubusercontent.com/1102595/206658000-d349ef06-e4f2-4626-9deb-6c8a246f7553.mp4)
Try it out at [photoshot.app](https://photoshot.app)
## Stack
- ▲ [Next.js](https://nextjs.org/) for webapp
- 🖼 [Chakra UI](https://chakra-ui.com/) for UI components
- 📦 [Prisma](https://www.prisma.io/) for database
- 🧠 [Replicate](https://replicate.com/), a platform for running machine learning models in the cloud
- 💰 [Stripe](https://stripe.com/) for payments
- 👩🎨 [Flux](https://blackforestlabs.ai/) an open-source text-to-image generation model
## Getting Started
Install dependencies:
```bash
yarn install
```
You can use Docker to run a local postgres database and maildev server (accessible at http://localhost:1080):
```bash
docker-compose up -d
```
Create .env.local:
```bash
cp .env.example .env.local
```
Update environment variable values:
| Environment Variable | Explanation |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| DATABASE_URL | The connection string for your PostgreSQL database. It will be `postgresql://photoshot:photoshot@localhost:5432/photoshot` if you are using the provided docket setup. |
| NEXTAUTH_URL | The URL of your Next.js application, used for authentication purposes with NextAuth.js. |
| S3_UPLOAD_KEY | The access key for your AWS S3 bucket used for storing pictures. |
| S3_UPLOAD_SECRET | The secret key for your AWS S3 bucket used for storing pictures. |
| S3_UPLOAD_BUCKET | The name of your AWS S3 bucket used for storing pictures. |
| S3_UPLOAD_REGION | The AWS region where your S3 bucket is located. |
| REPLICATE_API_TOKEN | The [API token](https://replicate.com/account) for Replicate. |
| REPLICATE_USERNAME | The username associated with your Replicate account. |
| REPLICATE_MAX_TRAIN_STEPS | The maximum number of training steps for the Dreambooth AI model. Defaults to `3000`. |
| REPLICATE_NEGATIVE_PROMPT | A prompt used for negative training examples in the Replicate AI model. Defualts to `cropped face, cover face, cover visage, mutated hands` |
| REPLICATE_HD_VERSION_MODEL_ID | The version of the model for upscaling the generated images. Such models can be browsed [here](https://replicate.com/collections/super-resolution) |
| NEXT_PUBLIC_REPLICATE_INSTANCE_TOKEN | A unique identifier for the training data. It can be any string. For best results use an identifier containing three Unicode characters, without spaces e.g. `cjw` |
| SECRET | A random string used for NextAuth.js authentication. |
| EMAIL_FROM | The email address from which emails will be sent. |
| EMAIL_SERVER | The SMTP server URL used for sending emails. It will be `http://localhost:25` if you are using the provided docker setup, |
| STRIPE_SECRET_KEY | The API key for your Stripe account. |
| NEXT_PUBLIC_STRIPE_STUDIO_PRICE | The price of a studio in cents (e.g., 1000 = $10). |
| NEXT_PUBLIC_STUDIO_SHOT_AMOUNT | The maximum number of shots allowed per studio. |
| OPENAI_API_KEY | The API key for the OpenAI API, used for the prompt wizard feature. |
| OPENAI_API_SEED_PROMPT | A seed prompt used for generating style prompts using the OpenAI API. |
Please note that if you want to use the provided `docker-compose` setup you have to disable `TLS` in your `.env.local` by adding:
```
NODE_TLS_REJECT_UNAUTHORIZED = "0"
```
Run migrations
```bash
yarn prisma:migrate:dev
```
Run the development server:
```bash
npm run dev
# or
yarn dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
", Assign "at most 3 tags" to the expected json: {"id":"595","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"