A newer version of the Gradio SDK is available:
5.20.1
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
- Input Text: Enter the sentence with grammatical errors in the "Input Text" box.
- Adjust Parameters: Use the sliders to adjust parameters like max length, min length, max new tokens, number of beams, temperature, and top-p.
- Correct Grammar: Click the "Correct Grammar" button to generate the corrected sentence.
- 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:
Clone the repository:
git clone https://huggingface.co/spaces/your-username/grammar-correction cd grammar-correction
Install the required packages:
pip install -r requirements.txt
Run the application:
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.