This project is a Django-based web application that automatically generates articles on various topics using OpenAI's GPT-4 language model. The application allows users to select a topic, and then it generates an article related to that topic.
Note: This project is just an idea that I have started. It needs a lot more work to be complete. Contributions are welcomed.
- Random Topic Selection: Picks a random topic from a predefined list of topics stored in the database.
- Article Generation: Uses GPT-4 to generate a unique article based on the selected topic.
- Database Storage: Stores the generated articles in a database for future reference.
- Management Commands: Custom Django management command to trigger article generation.
- Backend: Python, Django
- Database: SQL
- Other Libraries: OpenAI's GPT-4
- Clone the repository
git clone https://github.com/YourUsername/ArticleGenerator.git
- Navigate to the project directory
cd ArticleGenerator - Create a virtual environment and activate it
python3 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the required packages
pip install -r requirements.txt
- Create a
.envfile in the root directory to store your OpenAI API keyOPENAI_API_KEY=your-api-key-here
- Run migrations
python manage.py migrate
- Start the development server
python manage.py runserver
get yourself an API Key - Replace the existing one (since OpenAI don't allow public view on private keys)
To generate an article, run the custom management command:
python manage.py generate_articlePull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

