Installation Guide
Prerequisites
- Python 3.8 or higher
- pip package manager
- Virtual environment (recommended)
Step-by-Step Installation
1. Clone the Repository
2. Create Virtual Environment
3. Install Dependencies
4. Install Optional Dependencies
PyTorch (for local models)
For local model support, install PyTorch:
PDF Processing
PDF support is already included in requirements.txt:
LangChain (for advanced document processing)
For document splitting and advanced RAG workflows:
5. Install as Package (Optional)
To install as an editable package:
API Key Setup
Required API Keys
You need at least one of these API keys depending on which provider you use:
Hugging Face Token
- Go to https://huggingface.co/settings/tokens
- Create a new token (read access is sufficient)
- Set the environment variable:
Google Gemini API Key
- Go to https://aistudio.google.com/app/apikey
- Create an API key
- Set the environment variable:
Using .env File
Create a .env file in the project root:
Edit .env with your keys:
HF_TOKEN=your_huggingface_token_here
GEMINI_API_KEY=your_gemini_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
Verify Installation
Run this to verify everything is installed correctly:
# Test imports
from llm_helper import AIHelper
import pandas as pd
import transformers
print("✅ All packages installed successfully!")
Troubleshooting
ModuleNotFoundError: transformers
PyTorch/TensorFlow Warning
Install PyTorch to suppress the warning:
API Authentication Errors
Check if your API keys are set:
Jupyter Kernel Issues
-
Install ipykernel in your venv:
-
Add the kernel:
-
Select the kernel in Jupyter/VS Code
Next Steps
- Continue to the Usage Guide
- Check out Examples
- Read the API Reference