Giter Club home page Giter Club logo

dalle_image_generator's Introduction

DALL·E 2 Image Generator Python App

forthebadge made-with-python Python 3.8

YouTube Thumbnail

Overview

This project demonstrates the creation of a "Text to Image" application using Python, OpenAI, and Streamlit. The following technologies and services are used:

  • Streamlit as a server and handling front end.
  • OpenAI API key from OpenAI.
  • DALL.E-2 model for text-to-image generation.
  • AWS EC2 for deployment (24/7 running).

Steps

  1. Create free accounts on OpenAI and AWS.
  2. Create a Streamlit App.
  3. Create an EC2 instance on AWS.
  4. Git clone this repository on the EC2 instance.
  5. Install the requirements.
  6. Use the OPENAI_API_KEY in your code (avoid using static values, use global variables).
  7. Run the script on the EC2 instance.

Usage

To use this project:

  1. Clone the repository.
  2. Open a terminal in the working directory.
  3. Run the following command to install the required dependencies:
    pip install -r requirements.txt
    
  4. Set the OPENAI_API_KEY as a global variable in your environment (replace -------API KEY-------- with your actual API key):
    export OPENAI_API_KEY="-------API KEY--------"
    
  5. The App.py file contains the Streamlit application.
  6. Run the script with the following command:
    nohup python3 streamlit run App.py --server.port 80
    
  7. To stop the running application:
    • Get the process ID of the running process:
      ps -ef 
      
    • Kill the process using its ID:
      kill [PROCESS_ID]
      

For a more detailed explanation of this project, refer to the tutorial on the Machine Learning Hub YouTube channel.

Screenshots

Support

If you find this project helpful, consider supporting me:

Feel free to follow me and star⭐ this repository!

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.