https://github.com/davydantoniuk/grammarfix-bot
Fine-tuned a Hugging Face transformer model for enhanced grammar correction and deployed a messenger bot and app for real-time English sentence improvement.
https://github.com/davydantoniuk/grammarfix-bot
deep-learning flask javascript python telegram-bot telegram-bot-api transformers
Last synced: 3 months ago
JSON representation
Fine-tuned a Hugging Face transformer model for enhanced grammar correction and deployed a messenger bot and app for real-time English sentence improvement.
- Host: GitHub
- URL: https://github.com/davydantoniuk/grammarfix-bot
- Owner: davydantoniuk
- License: mit
- Created: 2024-10-23T19:15:28.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-04T02:10:31.000Z (5 months ago)
- Last Synced: 2025-02-24T13:36:51.275Z (4 months ago)
- Topics: deep-learning, flask, javascript, python, telegram-bot, telegram-bot-api, transformers
- Language: Jupyter Notebook
- Homepage:
- Size: 1.13 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Grammar Fix Bot
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.
## Features
- **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](https://huggingface.co/pszemraj/grammar-synthesis-small).
- **Real-Time Correction**: Delivers seamless grammar correction through a user-friendly messenger bot and app interface.## Example Photos
Here are some example photos showing how the Telegram bot and app work:
![]()
![]()
## Running the Flask App Locally
To run the Flask app on your local machine, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/davydantoniuk/grammarfix-bot.git
cd grammarfix-bot
```2. Create a virtual environment and activate it:
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```3. Install the required dependencies:
```bash
pip install -r requirements.txt
```4. Run the Flask app:
```bash
cd app
python app.py
```5. Open your browser and navigate to `http://127.0.0.1:5000` to see the app in action.