Automagically create hundreds of blogs for free with the power of local llms.
Developed with the software and tools below.
Table of Contents
Auto-Blogger is an open-source software project designed to automate blog creation with the power of AI. Users input their desired blog topic, the app. The Blog Manager then orchestrates content generation by interacting with the Blog Writer module, which uses an intelligent language model to create engaging and insightful blog posts. Once generated, the Blog Manager saves the blogs to local storage, allowing users to efficiently generate content.
Feature | Description | |
---|---|---|
⚙️ | Architecture | Microservices-based architecture with modular components and clear separation of concerns: blog management, generation, and writing. |
🔩 | Code Quality | Adheres to PEP8 coding style; well-documented functions and modules. |
📄 | Documentation | Detailed README file with project description, setup instructions, and API documentation in Markdown format. |
🧩 | Modularity | Strongly modular, with each file handling a specific functionality and communicating through interfaces defined by clear APIs. |
📦 | Dependencies | Primarily dependent on Python, Streamlit, Ollama (and related packages) as specified in project dependencies. |
└── auto_blogger/
├── app.py
├── auto_blogger.ipynb
├── blog_generator.py
├── blog_manager.py
├── blog_writer.py
├── blogs
│ ├── blog1.md
│ ├── blog2.md
└── utils.py
.
File | Summary |
---|---|
blog_manager.py | Create, retrieve, and track blog files based on topics. Class BlogManager offers functions fetch_existing_blogs (getting existing blogs), save_text_as_markdown (creating new ones), and fetch_stats_for_md_files (retrieving statistics). |
utils.py | In the given architecture, utils.py serves as a utility module by providing functions to format blog topics and titles for easier handling within the auto_blogger system. Specifically, its format_func method generates string representations of these data points in a uniform, topic-title format. |
blog_generator.py | Generate blog posts from given topics with this module. It fetches sections from outlines, writes content for each section, and saves formatted markdown files. Improves over time as it learns from existing blogs. |
auto_blogger.ipynb | In the given codebase residing in the auto_blogger repository, the file blog_manager.py plays a central role in managing and orchestrating the creation and publication of blogs using different technologies.This critical component interacts with various other modules and systems like blog generator, Kafka messaging system, and writer, ensuring a smooth workflow. The main purpose of blog_manager.py is to act as a conductor that ties these functionalities together by receiving instructions and triggering the appropriate actions to generate blogs using specific tech stacks, manage their creation, and ultimately publish them through the specified channels.With its strategic position within this architecture, this file plays an integral part in automating the blogging process and allowing users to generate and share content effectively with different technology combinations. |
app.py | Generate blogs using the AI Blog Generator app. This main file, app.py , creates an interface with Streamlit. It handles user inputs for blog topic, count, and format preference. Upon generation, the app displays the created blogs within the UI or saves them in a designated folder for future access. |
blog_writer.py | Engage with an intelligent blog writer module. It leverages an AI language model to generate captivating content. Class BlogWriter processes user-provided text and returns AI-generated completion, enhancing your blogs with rich and thoughtful insights. |
System Requirements:
- Python:
version 3.11.8
- Clone the auto_blogger repository:
$ git clone https://github.com/ikramhasan/AutoBlog-AI-Blog-Generator.git
- Change to the project directory:
$ cd AutoBlog-AI-Blog-Generator
- Install the dependencies:
$ pip install -r requirements.txt
Install Ollama from here: Ollama
Pull your preferred llm model:
$ ollama run mistral:7b-instruct
Note: You can use any model you prefer. The above command is just an example. Make sure to replace
mistral:7b-instruct
with your preferred model inblog_writer.py
.
- Start the ollama server:
$ ollama serve
Run auto_blogger using the command below:
$ python app.py
-
► Add support for llama.cpp, lmstudio
-
► Improve formatting
-
► Add multi-llm support
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests for the
auto_blogger
project. - Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your local account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/ikramhasan/AutoBlog-AI-Blog-Generator.git
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to local: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is protected under the MIT License. For more details, refer to the LICENSE file.
- Ollama
- Streamlit
- Jupyter
- LiteLLM