Colab Notebook for quick testing Colab: QA-RAG Pipeline
For development in local using VS code. Run below commands. This will create virtual environment, activate it, install packages
Prerequisites - Python 3.12.2, pip
| Windows | Mac/Linux |
|---|---|
|
|
Now run
python main.pyfile to start FastAPI server and check http://127.0.0.1:8181 ORpython gradio_app.pyfor Gradio app and check http://127.0.0.1:8181
From root directory run below command for fastapi server
docker-compose -f docker-compose-local.yml --env-file env_var_files/.env.local up -d
NOTE: From Dockerfile - Commnent & Uncomment below code to switch FastAPI with Gradio App
EXPOSE ${PORT}
CMD uvicorn main:app --host ${HOST} --port ${PORT}
# EXPOSE ${GRADIOPORT}
# CMD python gradio_app.py
- Have not finished building the fully parameterised app for creating pipelines due to insufficient system RAM. You can adjust all necessary settings in
env_var_files/.env.localto run app as desired. Going forward we can predfined the embedding & llm models, enabling us to utilise different input files to create a new vector database collection for conducting Q&A. - Hugging Face embedding model
all-mpnet-base-v2 - Hugging Face LLM model for QnA
google/gemma-1.1-2b-it - Check postman collection to make request