This web application generates an essay outline and a full essay based on a given subject, with GroqCloud API to generate content using llama3-8b-8192 model. It also allows saving the generated essay as a DOCX or PDF file.
- Generate an essay outline from a provided subject
- Generate a full essay based on the outline
- Save the generated essay as a DOCX file
- Save the generated essay as a PDF file
- Friendly web design
- Python (Flask) for the backend
- JavaScript for frontend interactions
- HTML/CSS for the frontend design
- ReportLab for PDF generation
- python-docx for DOCX generation
- Python 3.x
- pip
-
Clone the repository:
git clone https://github.com/obaskly/Essay-Generator.git cd Essay-Generator
-
Install the required packages:
pip install -r requirements.txt
- Get your free api from here https://console.groq.com/keys and place it in line 14 in app.py
-
Start the Flask server:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5000
.
- Enter a subject in the input box and click "Continue" to generate an outline.
- Review and modify the generated outline if necessary.
- Click "Generate Essay" to create a full essay based on the outline.
- Save the essay by clicking "Save as DOCX" or "Save as PDF".
app.py
: Main Flask application file.templates/index.html
: HTML template for the web interface.static/styles.css
: CSS styles for the web interface.requirements.txt
: List of Python packages required for the project.
- The script now generates references and places them at the end. But sometimes they are still between paragraphs. I'll improve that later.