Skip all Science Advising hassle and go to GDSC Advising instead!
Make sure Ollama is installed
ollama -vPull the required Mistral model
ollama pull mistral:7b-instructMistral should be accessible at port 11434 now through Ollama locally.
Move to the frontend directory
cd frontendMake sure npm is installed
npm -vInstall dependencies
npm installRun development server
npm run devMove to the backend directory
cd backendMake sure Python is installed (3.12.1 preferred)
python -vCreate a virtual environment
python -m venv venvStart the virtual environment
source venv/bin/activateInstall the required dependencies
pip install -r requirements.txtStart the application
sh ./start.shVisit http://0.0.0.0:8000 to access the backend (CORS is supported).
Make a query with a POST request to the /db/retrieve endpoint.
curl -X POST "http://0.0.0.0:8000/db/retrieve" \
-H "Content-Type: application/json" \
-d '{"text": "What does computer science at UBC teach?"}'Move to the backend directory
cd backendBuild the image
docker build -t gdsc-advising-backend .Start container from image
docker run --env-file .env -p 8000:8000 gdsc-advising-backendUse Docker Compose
docker-compose up