GithubHelp home page GithubHelp logo

mileshan / photoshot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from baptadn/photoshot

0.0 0.0 0.0 35.75 MB

An open-source AI avatar generator web app - https://photoshot.app

Home Page: https://photoshot.app

License: MIT License

JavaScript 0.18% TypeScript 99.82%

photoshot's Introduction

Photoshot

Twitter

An open-source AI avatar generator web app

demo-final.mp4

Try it out at photoshot.app

Stack

  • โ–ฒ Next.js for webapp
  • ๐Ÿ–ผ Chakra UI for UI components
  • ๐Ÿ“ฆ Prisma for database
  • ๐Ÿง  Replicate, a platform for running machine learning models in the cloud
  • ๐Ÿ’ฐ Stripe for payments
  • ๐Ÿ‘ฉโ€๐ŸŽจ Stable Diffusion an open-source text-to-image generation model

Getting Started

Install dependencies:

yarn install

You can use Docker to run a local postgres database and maildev server (accessible at http://localhost:1080):

docker-compose up -d

Create .env.local:

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 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
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

yarn prisma:migrate:dev

Run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

photoshot's People

Contributors

baptadn avatar durdn avatar adipasquale avatar green-mint avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.