Code Monkey home page Code Monkey logo

promptifier's Introduction

Promptifier

Simple utility for randomly generating prompts from a template.

This tool generates prompts from templates in the form a random {prompt|word} by choosing a random word from the curly braces to select, separated by the pipes. The above could generate a random prompt or a random word.

Curly braces can be nested: this {{large |}cake|{loud|tiny} boat} is not very nice can generate this cake is not very nice, this loud boat is not very nice, this large cake is not very nice, etc.

Choices may also be weighted: {ball:1|box:3} is 3x as likely to generate box as it is to generate ball. Weights can be any positive integer or decimal value.

Usage: promptifier.exe [OPTIONS] [PROMPT]

Arguments:
  [PROMPT]  Source prompt to parse

Options:
  -i, --input-file <INPUT_FILE>
          File to take source prompt from
  -n, --num <NUM>
          Number of prompts to generate [default: 1]
  -o, --out <OUT>
          Output file [default: prompts.txt]
  -v, --verbose
          Print generated prompts to console
  -d, --dry-run
          Don't save the generated prompts; not very useful without --verbose
  -g, --choice-guidance <CHOICE_GUIDANCE>
          Specify a guidance heuristic to use when making choices, overriding random selection [possible values: shortest, longest, least-likely, most-likely]
  -e, --ignore-invalid-weight-literals
          Ignore improperly formatted weights and interpret the full text, including the malformed weight specifier, as a choice with a weight of 1. Useful when combining with emphasis syntax common in diffusion UIs. Does not ignore errors produced from negative weights
  -s, --seed <SEED>
          Seed for the random number generator. Pass the same seed to get the same set of prompts
  -h, --help
          Print help

promptifier's People

Contributors

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