Code Monkey home page Code Monkey logo

imageforge's Introduction

imageForge - Full-Stack Django Web App

Project Overview

This is a full-stack Django-based web application that integrates the OPENAI API by using the ChatGPT 3.5 Turbo and DALL-E 2 Models to generate random and unique artwork.

Deployment Link

This project is live! Check it out here.

Screenshots

imageForge Homepage

imageForge Generation

Table of Contents

Goals & MVP

The aim of this application is to create a full-stack application in the Django framework that can create random and unique images by leveraging modern tools including the OpenAI API.

Tech Stack

  • HTML
  • CSS
  • Django
  • Python
  • JavaScript
  • DALL-E 2 API
  • ChatGPT 3.5 Turbo API
  • SQLite / Postgres
  • AWS S3 Bucket
  • Heroku

Build Steps

  1. Clone the project from GitHub:

    git clone [email protected]:cyberforge1/imageForge.git
    
  2. Register for an OpenAI API key at the following link.

  3. Run the generateSecretKey.py file in the root directory to create a Django secret key.

  4. Create a .env file in the root directory and attach the values of the keys generated in Steps 1 and 2:

    OPENAI_API_KEY= replace-this-value
    SECRET_KEY= replace-this-value
    
  5. Create a virtual environment:

    python -m venv venv
  6. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  7. Install project dependencies with pip:

    pip install -r requirements.txt
  8. Set up and migrate the SQLite database:

    python manage.py migrate
  9. Run the application locally:

    python manage.py runserver

How To Use

To create an image, navigate to the generation page and click ‘generate’, then convert the unique prompt into unique art with a button click. The generated images can be viewed in a public gallery or a private history if logged in.

Design Goals

  • This project was designed to be a fun and intuitive experience for users to navigate through the application to generate unique artwork.
  • A careful selection of backgrounds throughout the application aims to create an immersive user experience.
  • The Gallery and User History pages were inspired indirectly by the Instagram platform.

Project Features

  • A user registration and login system
  • A collection of local data for creating randomized prompts
  • A series of Python scripts that generate prompts and make API requests
  • Generation of unique data using the ChatGPT 3.5 Turbo & DALL-E 2 Models
  • A full-stack application to display this data

Additions & Improvements

  • Addition of delete functionality to the User History page
  • Refine the Generation Page background image
  • Improve styling on Login and Registration Pages
  • Add a download link on modals for images
  • Create mobile responsive design and mobile navbar

Learning Highlights

This project started as a passion project and was my first full-stack application

  • Creation of a complete MVC backend
  • Implementing API calls, handling the returned data and displaying it in the application
  • Setting up local and remote databases
  • Solidifying skills in Python scripting
  • Deploying a Django application to Heroku

Known Issues

When a user is signed in and has a limited number of images generated, only a partial background image is displayed on the User History page.

Challenges

  • Creating a system that could store the images dynamically so that many users could access and interact with the application simultaneously. This was resolved by attaching an AWS S3 Bucket.
  • Correcting the grammar and other inconsistencies of the locally generated prompts. This was resolved by making a call to the ChatGPT API.

Contact Me


Thanks for your interest in this project. Feel free to reach out with any thoughts or questions.

Oliver Jenkins © 2024

imageforge's People

Contributors

cyberforge-1 avatar

Watchers

Oliver Jenkins 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.