Giter Club home page Giter Club logo

openai-images-app's Introduction

Image generation with OpenAI API

Using OpenAI API to generate images from a description. It uses the Flask web framework. Check out the tutorial or follow the instructions below to get set up.

Example 1

van_gogh_is_painting_starry_night

Description: "Van Gogh is painting starry night"

Example 2

snoopy_in_a_rocket_in_space

Description: "Snoopy in a rocket in space"

Setup

  1. If you don’t have Python installed, install it from here

  2. Clone this repository

  3. Navigate into the project directory

    $ cd openai-images-app
  4. Create a new virtual environment

    $ python -m venv venv
    $ . venv/bin/activate
  5. Install the requirements and upgrade openai

    $ pip install -r requirements.txt
  6. Make a copy of the example environment variables file

    $ cp .env.example .env
  7. Add your API key to the newly created .env file

  8. Run the app on localhost port 5002 (feel free to change it to another port number)

    $ flask run -h localhost -p 5002

You should now be able to access the app at http://localhost:5002

Optional

In the future, if you want to upgrade your openai version, run this:

$ pip install --upgrade openai

And if you want to update your requirements.txt file, run this:

$ pip freeze > requirements.txt   

openai-images-app's People

Contributors

mrdavidlong avatar

Watchers

 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.