Coder Social home page Coder Social logo

inspectigator's Introduction

Inspectigator

Inspectigator is a proof of concept Python application that leverages multiple OpenAI API calls to validate expected results or reject them. It allows users to input a color and shape, which then generates a corresponding image using DALL·E 3. The generated image is further inspected by GPT-4's vision capabilities to ensure the image contains the specified color and shape.

Features

  • User input validation for color and shape.
  • Image description generation using OpenAI's GPT-4 model.
  • Image creation with DALL·E 3 based on the generated description.
  • Image inspection using GPT-4's vision capabilities to validate the content.
  • Local storage of generated images.
  • Direct opening of generated image URLs in a web browser.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed Python 3.9 or higher.
  • You have an OpenAI API key with access to GPT-4 and DALL·E 3 models.
  • You have installed the required Python packages listed in requirements.txt.

Installation

To install Inspectigator, follow these steps:

  1. Clone the repository:
    git clone https://github.com/Jmackles/inspectigator.git
  2. Navigate to the project directory:
    cd inspectigator
  3. Install the required packages:
    pip install -r requirements.txt

Usage

To use Inspectigator, run the following command in your terminal:

python inspectigator.py

Follow the prompts to enter a color followed by a shape (e.g., "red circle"). The program will attempt to generate and validate an image up to three times before exiting.

Configuration

Create a .env file in the root directory of the project with the following content:

OPENAI_API_KEY=your_openai_api_key_here

Replace your_openai_api_key_here with your actual OpenAI API key.

inspectigator's People

Contributors

jmackles avatar

Watchers

Kostas Georgiou 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.