Grammar Fix Bot is a robust project designed to enhance English grammar correction capabilities. It includes tools for generating error-ridden training datasets, fine-tuning transformer models, and providing real-time grammar correction via a messenger bot and app.
- Data Preparation: Utilizes a JavaScript script to scrape sentences from downloaded books and generate error-prone versions using the Google Bard API.
- Model Fine-Tuning: Fine-tunes a pre-trained transformer model from Hugging Face on a curated dataset for optimal grammar correction performance. The model used for fine-tuning can be found here.
- Real-Time Correction: Delivers seamless grammar correction through a user-friendly messenger bot and app interface.
Here are some example photos showing how the Telegram bot and app work:
To run the Flask app on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/davydantoniuk/grammarfix-bot.git cd grammarfix-bot
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Flask app:
cd app python app.py
-
Open your browser and navigate to
http://127.0.0.1:5000
to see the app in action.