Giter Site home page Giter Site logo

jadentripp / prompt_gen Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 58 KB

A prompt generator for Midjourney v6 powered by and built in collaboration with Claude 3.5 Sonnet

Python 57.14% HTML 42.86%
anthropic anthropic-claude claude-3-5-sonnet claude-api midjourney prompt-engineering prompt-generator midjourney-v6

prompt_gen's Introduction

AI Prompt Generator

Project Overview

This project is an AI Prompt Generator that creates prompts for Midjourney v6 image generation and Udio music generation using the Anthropic API. It includes a command-line interface for generating prompts and a Flask web application for viewing the outputs.

Project Structure

  • app.py: Flask web application for viewing generated prompts
  • main.py: Command-line interface for generating prompts
  • prompts/: Directory containing prompt templates
    • midjourney.txt: Template for Midjourney v6 prompts
    • udio.txt: Template for Udio music prompts
  • outputs/: Directory where generated prompts are stored
  • templates/: HTML templates for the web application

Setup and Usage

  1. Install required dependencies:

    pip install flask anthropic termcolor python-dotenv
    
  2. Set up your Anthropic API key in a .env file:

    ANTHROPIC_API_KEY=your_api_key_here
    
  3. Run the prompt generator:

    python main.py
    
  4. Run the Flask web application:

    python app.py
    

    Access the web interface at http://127.0.0.1:5000

Features

Prompt Generation (main.py)

  • Supports Midjourney v6 and Udio prompt generation
  • Uses Anthropic's Claude 3.5 Sonnet model
  • Saves generated prompts to files with timestamps

Web Interface (app.py)

  • Displays generated prompts in a responsive layout
  • Supports pagination for large numbers of prompts
  • Parses and formats XML output from the prompt generator

Prompt Templates

Midjourney v6 (midjourney.txt)

  • Generates 5 diverse image prompts
  • Incorporates Midjourney v6 best practices and parameters
  • Includes explanations for each generated prompt

Key parameters:

  • Aspect ratio (--ar)
  • Chaos (--chaos)
  • Quality (--quality)
  • Seed (--seed)
  • Stylize (--stylize)
  • Weird (--weird)
  • Tile (--tile)
  • No (negative prompting)

Udio Music (udio.txt)

  • Generates 5 diverse music prompts
  • Focuses on genre, mood, instruments, tempo, and lyrical themes
  • Utilizes Udio-specific features and parameters

Key features:

  • Custom lyrics
  • Instrumental mode
  • Manual mode
  • Extension mode
  • Remixing
  • Inpainting

Development

  • The project uses Flask for the web framework
  • Jinja2 is used for HTML templating
  • CSS is used for responsive design
  • JavaScript handles dynamic content loading and pagination

Contributing

Contributions are welcome! Please submit pull requests or open issues for any bugs or feature requests.

prompt_gen's People

Contributors

jadentripp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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