WordSmith is a text-processing web app to perform simple operations such as fixing the spelling, grammar, summarization or getting suggestion on the textual input. This project is built for Chrome Built in AI Challenge. Built this along with - https://github.com/Saqib7khan
HTML
0
11 commits
updated Dec 2, 2024
The Text Processing API is designed to provide multiple features for text enhancement, including spelling correction, text summarization, grammar correction, and suggestions to improve written content. This API leverages advanced models like T5, Falcon, and Google Gemini for natural language processing tasks. The front-end interface allows users to input text and receive processed results through simple HTTP POST requests.
pip install flask transformers happytransformer google-generativeai
Set up the Flask Application: Ensure the provided Python script (app.py) is saved in your project directory.
Configure Google API: Make sure to set up your Google API key in the script. Replace the placeholder in genai.configure(api_key="YOUR_API_KEY").
Run the Application: In your terminal, navigate to the project folder and run:
flask run
Access the Application: Open a web browser and go to http://127.0.0.1:5000/. You will be able to interact with the interface and test the text processing features.
Description:
This endpoint serves the main interface HTML file that contains the text input fields and buttons for the user to interact with the various text processing features.
Response:
text/htmlindex.html file is served to the client.Description:
This endpoint is used to process and correct the spelling of the provided input text using the T5 large spelling model.
Request Body (JSON):
{
"text": "Input text with spelling errors."
}
Response Body (JSON):
{
"spelling_corrected": "Corrected text with proper spelling."
}
Notes:
process_summarization(), process_suggestions() and process_grammar() work in the same way.
The front-end interface is a web page that interacts with the above API endpoints. It provides an easy-to-use form where users can input text and select the desired processing option. The page also displays the output of the text processing tasks.
This project is licensed under the MIT License. See the LICENSE file for details.
WordSmith is a text-processing web app to perform simple operations such as fixing the spelling, grammar, summarization or getting suggestion on the textual input. This project is built for Chrome Built in AI Challenge. Built this along with - https://github.com/Saqib7khan
HTML
0
11 commits
updated Dec 2, 2024
The Text Processing API is designed to provide multiple features for text enhancement, including spelling correction, text summarization, grammar correction, and suggestions to improve written content. This API leverages advanced models like T5, Falcon, and Google Gemini for natural language processing tasks. The front-end interface allows users to input text and receive processed results through simple HTTP POST requests.
pip install flask transformers happytransformer google-generativeai
Set up the Flask Application: Ensure the provided Python script (app.py) is saved in your project directory.
Configure Google API: Make sure to set up your Google API key in the script. Replace the placeholder in genai.configure(api_key="YOUR_API_KEY").
Run the Application: In your terminal, navigate to the project folder and run:
flask run
Access the Application: Open a web browser and go to http://127.0.0.1:5000/. You will be able to interact with the interface and test the text processing features.
Description:
This endpoint serves the main interface HTML file that contains the text input fields and buttons for the user to interact with the various text processing features.
Response:
text/htmlindex.html file is served to the client.Description:
This endpoint is used to process and correct the spelling of the provided input text using the T5 large spelling model.
Request Body (JSON):
{
"text": "Input text with spelling errors."
}
Response Body (JSON):
{
"spelling_corrected": "Corrected text with proper spelling."
}
Notes:
process_summarization(), process_suggestions() and process_grammar() work in the same way.
The front-end interface is a web page that interacts with the above API endpoints. It provides an easy-to-use form where users can input text and select the desired processing option. The page also displays the output of the text processing tasks.
This project is licensed under the MIT License. See the LICENSE file for details.