An elegant article writer assistant that creates (almost) ready for posting articles providing main ideas from the user, built with langchain
AIrticle Writer is an AI-powered Streamlit app that generates an almost-ready-to-post article about any topic based on the main ideas provided by the user. Simply input your request for an article, and the system will perform a multi-step process to generate, enhance, and optimize the content, ready for posting.
This app leverages a robust backend built using LangChain, which enables the process of scraping resources, generating ideas, creating an outline, expanding sections, and finally enhancing the article with a human-like tone. The article generation is done without using agents, ensuring better optimization of time and memory.
The app performs the following steps to generate the article:
For factual results, you can try the application by yourself or check the file ./comparison.txt
to see two articles generated by my pipeline and another pipeline.
The backend is built using LangChain, which provides all the necessary utilities for:
Backend Overview:
The design of this system is inspired by the way many writers approach their articles:
The figure (shown above) reflects this process, starting with gathering information, then creating outlines and drafts, followed by article enhancement. The final result is an almost ready-to-post article. We are working on the Generating and Gathering Pictures feature, which is not yet available. Feel free to collaborate on this feature by submitting a pull request!
The last component—Generating and Gathering Pictures—is under development. The idea behind this component is to either generate or retrieve relevant images to accompany sections of the article during its generation. If you'd like to contribute, feel free to make a pull request! I have already opened a feature request for this functionality, and your collaboration is welcome.
To run the app locally:
Clone this repository:
git clone https://github.com/Azzedde/AIrticle_writer.git
Install the required dependencies using the pyproject.toml
file:
pip install .
Create a .env
file in the root of the project with the following variables:
OPENAI_MODEL_NAME = <the model name>
OPENAI_API_KEY = <your OpenAI API key>
SERPER_API_KEY = <your Serper API key>
Run the Streamlit app:
streamlit run Home.py
The project requires the following dependencies (listed in pyproject.toml
):
This project is licensed under the MIT License - see the LICENSE file for details.