https://github.com/spidy20/dalle_image_generator
This is OpenAI DALL.E 2 Image Generator Python Web Application.
https://github.com/spidy20/dalle_image_generator
aws dalle-2 dalle2 ec2 openai-chatgpt openai-dall-e streamlit streamlit-webapp
Last synced: 17 days ago
JSON representation
This is OpenAI DALL.E 2 Image Generator Python Web Application.
- Host: GitHub
- URL: https://github.com/spidy20/dalle_image_generator
- Owner: Spidy20
- Created: 2023-07-01T06:22:08.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-07-01T15:01:55.000Z (over 2 years ago)
- Last Synced: 2024-11-15T06:29:53.591Z (11 months ago)
- Topics: aws, dalle-2, dalle2, ec2, openai-chatgpt, openai-dall-e, streamlit, streamlit-webapp
- Language: Python
- Homepage:
- Size: 516 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DALL·E 2 Image Generator Python App
[](https://www.python.org/)
[](https://www.python.org/downloads/release/python-360/)## [Watch the Tutorial for this Project](https://youtu.be/Ihcb3Lg4twI)

## 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](https://platform.openai.com/account/api-keys) and [AWS](https://console.aws.amazon.com/).
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:
- [Buy me a Coffee☕](https://www.buymeacoffee.com/spidy20)
- [Donate via PayPal](https://www.paypal.me/spidy1820) (It will inspire me to work on more projects)Feel free to follow me and star⭐ this repository!