This is a Cohere API powered contextualized writing feedback generation bot!
It responds to questions in the cli or streamlit chat by understanding the context of the conversation and then answering based on examples of constructive criticism.
Over the past few weeks, I have edited many of my friends' personal statements for future opportunities (i.e. scholarships, MS programs, PhD programs, etc.). The process of editing is time-intensive and I wanted to find a way to make it more efficient. This gave me a great idea to experiment with language models to give constructive criticism. Since language models don't have a mechanism for determining truth, the scope of this tool is limited to writing that is self-contained. This means the bot will not verify the truth behind statements but how they are used to support the objective.
Note: Due to limitations to co.generate, it is strongly recommended that text input does not exceed a paragraph.
Here is a quick video demoing the project!
To use this library, you will need:
- A Cohere API key: sign up for a free key at https://dashboard.cohere.ai/welcome/register.
- Clone the repository.
- Install all the dependencies
pip install -r requirements.txt
- Try the demo by running the cli tool
python3 cli_demo.py --cohere_api_key <API_KEY>
- (Optional) Run the streamlit demo:
In the cloned repository, create a folder
.streamlit/
. Inside the folder, create a file calledsecrets.toml
and insert the following:cohere_api_token = <<YOUR COHERE API KEY>>
. Then run the following command:
streamlit run streamlit_demo.py