Using transformers to predict the sentiment of movie reviews from the Stanford dataset available here.
We use poetry to manage the virtual env and dependency management.
- Install poetry from here
- From project root run
poetry install
this will create a virtual env in a .venv
folder and install all dependencies into it.
- To activate a shell in the venv run
poetry shell
To run the scripts the sample_data and sample env file can be used. For the full dataset download from here.
The 3 scripts are defined as executables in the pyproject.toml
file and if this repository is installed
as a package with either poetry install
or pip install .
the scripts can be called with simply: get_train_test_data
,
train
and predict_and_evaluate
.