This is a Python 3.11 FastAPI project with the necessary requirements added to the requirements.txt.
Python 3.11 installation should be pretty simple. Use your favorite search engine to figure out how to install Python 3.11. Note down the path of your installation.
Use the following command to create a virtual environment specifically for SI 650. Navigate to your search engine project folder and then use the following command:
<path of your python installation>/python -m venv si650
If you installed Python 3.11 without overwriting the default Python version, use the following command:
python3.11 -m venv searchEngine
This will create a folder searchEngine.
To activate the environment
- For Windows
searchEngine/bin/activate
- For others
source searchEngine/bin/activate
After activating the virtual environment, run
python -m pip install -r requirements.txt
This should install the libraries you need to start the server.
- The dataset should be in JSONL format where each lines is a separate JSON of the following format.
{
"docid": <document id>
"title": <document title>
"text": <the entire text of the document>
"categories": [<each Wikipedia category>]
}
The name of the index folder to be generated is set in the pipeline.py file.
After you have all of these files and the necessary Python requirements installed in your environment, run
python -m uvicorn app:app
to start the server.