Blog-Genarator-using-openAI
This project generates blog paragraphs on any topic using the OpenAI GPT-3 language model. It allows the user to input a topic and generates a paragraph of up to 400 words based on that topic. The generated text is not restricted to a specific domain or category and can be used for a wide range of purposes.
- Python 3.x
- OpenAI API key
- dotenv library
- VS Code
- Install OpenAI -
pip install openai
. - Install python-dotenv -
pip install python-dotenv
. - Create a file named
.env
in the root directory of the project. - Add your OpenAI API key to the
.env
file asAPI_KEY=<your_api_key>
.
- Run the program using the command
Blog_generator.py
. - When prompted, enter a topic for the paragraph.
- The program will generate a paragraph based on the topic entered.
- To generate more paragraphs, enter
y
when prompted.