API documentation can be found here
A postman collection with usage examples for each endpoint is exported to Word2Med.postman_collection.json.
To use, simply import this file within postman.
Follow these steps to run the word2med backend locally
Clone this repository and initialize a virtual environment in the root directory using the tool of your choice. (e.g. virtualenv). Note that the virtual environment must use version python3.10 or greater.
git clone https://github.com/ECE493Group8/word2med-backend.git
cd word2med-backend
virtualenv venvActivate your virtual environment
. venv/bin/activateInstall dependencies from requirements.txt
pip install -r requirements.txtNote: If you have issues in this step, ensure you have the latest pip version by running the following with you venv activated:
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
The backend expects a path to a trained Word2Med model, which it will query and use to form responses. See the model repository for more info on training a Word2Med model.
The model path is defined in the models.json file. An example of such a file
could be:
{
"model_1": "path/to/my.model",
"model_2": "another/path/to/my/other.model"
}The key is the ID of the model. This must match the key of the model ID in the
frontend's src/constants/models.js file. The value is the path to the model
file.
make runmake docs