.env files are needed for both the backend and the frontend.
backend/.env:
MODEL_ID=watsonx/meta-llama/llama-3-3-70b-instruct
WATSONX_URL=[your URL]
WATSONX_API_KEY=[your API key]
WATSONX_PROJECT_ID=[your project ID]
DISABLE_AIOHTTP_TRANSPORT=True
frontend/.env:
VITE_BACKEND_URL=http://localhost:8000
cd backendThe first time you run it you need to run:
poetry install
source .venv/bin/activateThat will create a venv virtual environment for you.
In case you prefer to install it manually, the requirements.txt file is provided:
pip install -r requirements.txtTo launch the server:
uvicorn main:app --reloadcd frontendThe first time you run it you need to run:
npm installTo launch the web app:
npm run devStart both services (frontend + backend) with Docker Compose for a convenient dev environment.
From the root directory:
docker-compose up --buildThe compose setup mounts local folders into the containers so code changes are reflected immediately.
- Backend will be available at
http://localhost:8000 - Frontend (Vite dev server) at
http://localhost:5173