The code uses tools made by other people. We need to download them. This is called installing packages. The tool is called pip. It downloads everything we need, all at once. Go make coffee. This takes about 4 minutes.
$ pip install -r requirements.txt
What you should see (lots of text, do not panic)
Collecting torch==2.1.0
Downloading torch-2.1.0-cp310-...whl (200 MB)
Collecting transformers==4.35.0
... (this goes on for a while)
Installing collected packages: torch, transformers, ...
✓ Successfully installed torch-2.1.0 transformers-4.35.0 ...
This might happen (the most common error)
torch CUDA error
RuntimeError: No CUDA GPUs are available
ERROR: Could not find a version that satisfies torch==2.1.0+cu118
This means your computer does not have a fancy graphics card (which is fine!). Open the file requirements.txt in any text editor. Find the line torch==2.1.0+cu118 and change it to torch==2.1.0. Save. Run the command again. It will work now.
This might also happen
pip is not the right Python version
ERROR: Python 3.8 is too old. Requires Python 3.10+
Use pip3 instead of pip. Or install Python 3.10 from python.org.
CheckpointDo you see Successfully installed at the bottom?