Giter Club home page Giter Club logo

ai-prompt-generator's Introduction

Build

yarn install

Environment Setup

cp .env.example .env
  • Add APIKeys of imagine.art and midjourney

Generate Images

imagineart

  1. script to generate using imagine.art is in directory: generate-image

  2. script to remix on existing base image is: remix-image

midjourney

  1. script to generate image via prompt and reference image generate-image
npx ts-node src/genai/midjourney/generate-image.ts
  1. script to query and get the response of midjourney
  • capture the messageId from the response of step-1

  • paste the messageId in the script for get-message-details get-message-details

  • run command:

 npx ts-node src/genai/midjourney/get-message-details.ts 
  • The message details should contain hyperlink/URL to the generated image

How to run via API

  1. nestJS API has POST-API endpoint to take reference image-name and traits as message-body

  2. usage of API:

  • start the service
yarn start:dev
  • Open Postman client and create a POST request with:

URL: http://localhost:3000/image

Request Body:

{
 "basecat": "new-cat",
 "traitsRecord": {
   "personality": "",
   "eye": "",
   "tail": "",
   "wearing": "sun glasses",
   "activity": "",
   "environment": "on the snow"
   }
}
  • reference values for the traits can be open, i.e you can fill them as per your imagination

  • API at moment uses the imagine-art AI

ai-prompt-generator's People

Contributors

defistar avatar

Watchers

lakshmi kanth 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.