This project is for people that want to deploy a RAG pipeline using MLflow.
The project uses:
LlamaIndex
andlangchain
as orchestratorsOllama
andHuggingfaceLLMs
MLflow
as an MLOps framework for deploying and tracking
- Clone the repository
git clone https://github.com/AnasAber/RAG_in_CPU.git
- Install the dependencies
pip install -r requirements.txt
Make sure to put your api_keys into the example.env
, and rename it to .env
- Notebook Prep:
- Put your own data files in the data/ folder
- Go to the notebook, and replace "api_key_here" with your huggingface_api_key
- If you have GPU, you're fine, if not, run it on google colab, and make sure to download the json file output at the end of the run.
- Go to
deployement
folder, and open two terminals:
python workflow.py
And after the run, go to your mlflow run, and pick the run ID: Place it into this command:
mlflow models serve -m runs:/<run id>/rag_deployement -p 5001
In the other terminal, make sure to run
app.py
- Open another terminal, and move to the
frontend
folder, and run:
npm start
Now, you should be seeing a web interface, and the two terminals are running.
If you got errors, try to see what's missing in the requirements.txt.
Enjoy!