- Make sure you have Python 3.x installed on your system.
- Clone this repository
- Change into project directory:
cd <project_directory>
- Create a virtualenv (optional but recommended):
python3 -m venv venv
- Activate the virtualenv
On macOS and Linux:
source venv/bin/activate
On Windows (PowerShell):.\venv\Scripts\Activate
- Install the required packages from the requirements.txt file:
pip install -r requirements.txt
flask run
Endpoint: http://127.0.0.1:5000/healthz
Method: GET
Description: Use this endpoint to check the health of the application.
Endpoint: http://127.0.0.1:5000/paraphrase
Method: POST
Description: Use this endpoint to send text data for paraphrasing.
- For successfull prediction (Text passed in formdata)
{
"paraphrased_text": "I am from India and currently live in Banglore and am thinking of starting a company.",
"status": 200
}
- If text not passed in formdata:
{
"error_message": "No text in form_data",
"status": 400
}
Endpoint: http://127.0.0.1:5000/correct-grammar
Method: POST
Description: Use this endpoint to send text data for grammar correction.
Response
- For successfull prediction (Text passed in formdata)
{
"corrected_text": "You are going to the party, right?",
"status": 200
}
- If text not passed in formdata:
{
"error_message": "No text in form_data",
"status": 400
}