Folder Analysis Tool Using LLM and RAG
-
place huggingface token in .env file
-
Install required packages:
pip install -r requirements.txt3.1. Run the script from the command line to read folder contents:
python folder_reader.py path/to/folder{
"filename.pdf": {
"file_type": "pdf",
"content": "extracted text content..."
},
"document.txt": {
"file_type": "txt",
"content": "text file content..."
}
}3.2.Run the script from the command line to execute RAG: DEFINE
- WORKING_DIR to set the working directory
- json_file to point to the output of folder_reader.py or JSON file containing contents of files
- cache_dir to specify the directory for huggingface cache
python rag_analyzer.py