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.
app.py
: Flask web application for viewing generated promptsmain.py
: Command-line interface for generating promptsprompts/
: Directory containing prompt templatesmidjourney.txt
: Template for Midjourney v6 promptsudio.txt
: Template for Udio music prompts
outputs/
: Directory where generated prompts are storedtemplates/
: HTML templates for the web application
-
Install required dependencies:
pip install flask anthropic termcolor python-dotenv
-
Set up your Anthropic API key in a
.env
file:ANTHROPIC_API_KEY=your_api_key_here
-
Run the prompt generator:
python main.py
-
Run the Flask web application:
python app.py
Access the web interface at
http://127.0.0.1:5000
- Supports Midjourney v6 and Udio prompt generation
- Uses Anthropic's Claude 3.5 Sonnet model
- Saves generated prompts to files with timestamps
- Displays generated prompts in a responsive layout
- Supports pagination for large numbers of prompts
- Parses and formats XML output from the prompt generator
- 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)
- 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
- 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
Contributions are welcome! Please submit pull requests or open issues for any bugs or feature requests.