A full-stack web application that leverages Artificial Intelligence to automatically generate engaging blog posts and matching header images. Built with Flask, OpenAI GPT, and Pollinations.ai.
https://bloggen-kfzr.onrender.com/
- Content Generation: Generates structured blog posts (Title, Introduction, Key Points, Conclusion) using OpenAI's GPT-4o-mini.
- Image Generation: Automatically creates context-aware header images using Pollinations.ai (No API key required for images).
- Markdown Support: Renders the blog output with proper formatting (Bold, Headings, Lists) using
Marked.js. - User Tools:
- 📋 One-Click Copy: Easily copy the blog text to your clipboard.
- 🖼️ Download Image: Save the generated image locally.
- Modern UI: Features a responsive design with Glassmorphism effects, animated gradients, and loading states.
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Backend: Python, Flask
- AI Models:
- Text: OpenAI GPT-4o-mini
- Images: Pollinations.ai (Stable Diffusion)
- Deployment: Render (Gunicorn)
Follow these steps to run the project locally on your machine.
git clone [https://github.com/YOUR_USERNAME/Blog_Generator.git](https://github.com/YOUR_USERNAME/Blog_Generator.git)
cd Blog_GeneratorMake sure you have Python installed. Then run:
pip install -r requirements.txtCreate a file named .env in the root directory and add your OpenAI API key:
OPENAI_API_KEY=sk-your-openai-api-key-here
python app.pyOpen your browser and navigate to: http://127.0.0.1:5000
/Blog_Generator
- ├── static/
- │ ├── style.css # Animations and Glassmorphism styles
- │ └── script.js # Frontend logic (Fetch API, DOM manipulation)
- ├── templates/
- │ └── index.html # Main user interface
- ├── app.py # Flask backend & AI integration
- ├── requirements.txt # Python dependencies
- ├── .env # API Keys (Not shared)
- └── README.md # Project documentation
This project is configured for easy deployment on Render.
- Push your code to GitHub.
- Create a new Web Service on Render.
- Connect your repository.
- Build Command: pip install -r requirements.txt
- Start Command: gunicorn app:app
- Add your OPENAI_API_KEY in the Render Environment Variables settings.
Contributions are welcome! Feel free to open issues or submit pull requests.
- Fork the repository.
- Create your feature branch (git checkout -b feature/AmazingFeature).
- Commit your changes (git commit -m 'Add some AmazingFeature').
- Push to the branch (git push origin feature/AmazingFeature).
- Open a Pull Request.
This project is open-source and available under the MIT License.
- Create a new file in VS Code named
README.md. - Paste the code above into it.
- Replace
YOUR_USERNAMEand the[Link to your live Render app here]with your actual details. - Push it to GitHub:
git add README.md git commit -m "Add documentation" git push