Follow these steps to run the FastAPI web application using uv for dependency management. These instructions are designed for users with no prior experience.
Make sure you have Python 3.12 or higher installed. You can download it from python.org.
To check your Python version, open a terminal and run:
python --versionor
python3 --versionuv is a fast Python dependency manager. Install it using the following command:
pip install uvIf you have multiple Python versions, you may need to use:
python3 -m pip install uvDownload the project files by cloning the repository. Replace <repo-url> with the actual repository URL:
git clone <repo-url>
cd CSCK507_NaturalLanguageProcessingAndUnderstandingUse uv to install all required packages listed in pyproject.toml:
uv syncThis will automatically read the dependency file and install everything needed.
Some features require the spaCy language model. Download it using:
uv run -- spacy download en_core_web_lgRun the FastAPI application using uvicorn (installed as a dependency):
uv run uvicorn src.main:app --host 0.0.0.0 --reloaduv runensures all dependencies are available.uvicornis the server that runs FastAPI.src.chatbot.main:apppoints to the FastAPI app instance.--host 0.0.0.0makes the server accessible on your network.--reloadenables auto-reloading for development.
Open your browser and go to:
http://localhost:8000
You should see the chatbot interface.
- If you see errors about missing dependencies, re-run
uv sync. - If
uvis not recognized, ensure it was installed and your PATH is set correctly. - For permission errors, try running commands with
sudo(Linux/macOS) or as administrator (Windows).
To run model evaluations:
uv run python evals.pyTo generate evaluation plots:
uv run python evals_plotting.py- Install Python and uv
- Clone the repository
- Install dependencies with
uv sync - Download spaCy model
- Start FastAPI with
uv run uvicorn src.main:app --host 0.0.0.0 --reload - Open
http://localhost:8000in your browser
You do not need to manually install packages with pip—uv handles everything for you.