Coder Social home page Coder Social logo

convergence-test's Introduction

Convergence test tool

This tool uses OpenAI's API to generate and describe images in an iterative process. It generates an image based on a text prompt, describes it, and then uses the description as a new prompt for the next image. This process continues for a specified number of iterations.

Features

  • Image Generation: Utilizes OpenAI's DALL-E model to create images from text prompts.
  • Image Description: Describes generated images using GPT-4.
  • Iterative Process: Generates a series of images, each based on the description of the previous one.
  • Continuation Capability: Can continue from the last image in a previously generated series.

Prerequisites

  • Python 3.x
  • OpenAI API Key

Installation

  1. Clone the repository to your local machine.
  2. Install the required Python packages:
    pip install openai requests

Usage

  1. Set up your OpenAI API key:

    • Save your API key in a text file, e.g., openai.key.
  2. Run the script:

    python script_name.py -a [API Key File] -g [Generation Prompt] -f [Output Folder] -d [Description Prompt] -n [Number of Iterations]

    Replace script_name.py with the actual script filename.

    Arguments:

    • -a or --api: The file containing the OpenAI API key.
    • -g or --generate-prompt: Initial prompt for generating images.
    • -f or --folder: Folder where to store the images.
    • -d or --describe-prompt: Prompt for describing images. (Default: "Describe the image in all details.")
    • -n or --number: Number of iterations. (Default: 10)

    Example:

    python script_name.py -a openai.key -g "A futuristic cityscape" -f generated_images -d "Describe the image in all details." -n 5

Important Notes

  • The script will create a new folder if it doesn't exist.
  • If the folder already contains images, the script will continue from the last numbered image.

Disclaimer

This tool uses the OpenAI API, and usage may incur costs based on your OpenAI usage plan.

convergence-test's People

Contributors

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