LLM Project is a Python library Model for dealing with word pluralization.
Use the package manager pip to install Project.
pip install -r requirements.txt
requirements.txt
, including Flask, pandas, transformers, sentence-transformers, and others.Demo Data 1 - Sheet1.csv
) is placed in the root directory of the project or specify the correct path.
Terminal
in VS Code then paste.python app.py #run with CSV file
python app_without_CSV.py #run without CSV file
import requests
url = 'http://127.0.0.1:5000/evaluate'
data = [
{
'answer_1': 'The cat is on the mat.',
'answer_2': 'There is a cat on the mat.',
'answer_3': 'A cat is sitting on a mat.',
'answer_4': 'On the mat, there is a cat.',
'student_answer': 'A cat is on the mat.'
},
# Add more student answers here
]
response = requests.post(url, json=data)
print(response.json())
Terminal
in VS Code then paste.
python test_api.py
[
{
"answer_1": "The cat is on the mat.",
"answer_2": "There is a cat on the mat.",
"answer_3": "A cat is sitting on a mat.",
"answer_4": "On the mat, there is a cat.",
"question": "Where is the cat?",
"student_answer": "A cat is on the mat."
}
]
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.