This project is for people that want to deploy a RAG pipeline using MLflow.
The project uses:
LlamaIndexandlangchainas orchestratorsOllamaandHuggingfaceLLMsMLflowas 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.txtMake 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
deployementfolder, and open two terminals:
python workflow.pyAnd 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 5001In the other terminal, make sure to run
app.py- Open another terminal, and move to the
frontendfolder, and run:
npm startNow, 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!
