grammar-correction / README.md
etemkocaaslan's picture
Update README.md
1cc6b16 verified
---
title: Grammar Correction
emoji: 🦀
colorFrom: indigo
colorTo: indigo
sdk: gradio
sdk_version: 4.37.2
app_file: app.py
pinned: false
license: apache-2.0
---
# Grammar Correction Tool
This project provides an interactive web interface for correcting English grammar using a pretrained T5 model. The interface is built using Gradio and hosted on Hugging Face Spaces.
## Overview
The Grammar Correction Tool leverages the `vennify/t5-base-grammar-correction` model to automatically correct grammatical errors in English sentences. Users can input a sentence with grammatical errors, and the tool will provide a corrected version of the sentence.
## Features
- **User-Friendly Interface**: Simple and intuitive web interface built with Gradio.
- **Customization Options**: Allows users to adjust parameters like maximum length, minimum length, number of beams, temperature, and top-p for text generation.
- **Pretrained Model**: Utilizes a pretrained T5 model specifically fine-tuned for grammar correction.
## Usage
1. **Input Text**: Enter the sentence with grammatical errors in the "Input Text" box.
2. **Adjust Parameters**: Use the sliders to adjust parameters like max length, min length, max new tokens, number of beams, temperature, and top-p.
3. **Correct Grammar**: Click the "Correct Grammar" button to generate the corrected sentence.
4. **View Output**: The corrected sentence will be displayed in the "Corrected Text" box.
## Installation
To run this project locally, you need to have Python installed. Follow the steps below to set up and run the project:
1. **Clone the repository**:
```bash
git clone https://huggingface.co/spaces/your-username/grammar-correction
cd grammar-correction
```
2. **Install the required packages**:
```bash
pip install -r requirements.txt
```
3. **Run the application**:
```bash
python app.py
```
## Files
- **app.py**: The main script that sets up and runs the Gradio interface.
- **requirements.txt**: A list of dependencies required to run the application.
- **README.md**: This file, providing an overview and setup instructions for the project.
## License
This project is licensed under the Apache 2.0 License.
## Acknowledgments
This project utilizes the `vennify/t5-base-grammar-correction` model from Hugging Face. Special thanks to the developers and contributors of the model and Gradio library.