An open-source, AI-powered platform that transforms financial education content into personalized learning experiences. Users can upload banking/finance documents or input topics to receive tailored educational content, quizzes, and explanations powered by advanced RAG (Retrieval-Augmented Generation) technology.
- Project Description
- Project Links
- Features
- Technology Stack
- Project Structure
- API Endpoints
- Deployment
- How to Run
- Contributing
- Author
FinEduGuide is an intelligent educational platform designed for banking and finance learning. It combines the power of:
- RAG (Retrieval-Augmented Generation) for context-aware responses
- Vector Database (Pinecone) for efficient document storage and retrieval
- Generative AI (OpenAI, Llama, Gemini via EuriAI) for content generation
- FastAPI backend for robust API services
- Streamlit frontend for intuitive user interaction
- AWS Cloud Infrastructure for scalable deployment
- CI/CD Pipeline with GitHub Actions for automated deployments
Target Users:
- Students and educators in banking/finance
- Self-learners interested in financial topics
- Developers exploring AI in education
- πΊ Demo Video: https://youtu.be/EQjH1oloHyc
- π Live Streamlit App: https://fineduguide-ai-assistant.streamlit.app/
- π FastAPI Swagger Docs: http://13.200.38.182:8080/docs
- π GitHub Repository: https://github.com/vineet416/FinEduGuide-AI-Assistant
- π Document Upload: Upload PDF and text files containing financial education content
- π Intelligent Q&A: Ask questions and receive AI-generated answers based on uploaded documents
- π§ RAG-Powered Responses: Context-aware answers using retrieval-augmented generation
- πΎ Cloud Storage: Automatic file backup to AWS S3
- π’ Vector Embeddings: Document content stored as embeddings in Pinecone for semantic search
- π¨ Interactive UI: User-friendly Streamlit interface for seamless interaction
- β‘ Fast API Backend: RESTful API with automatic Swagger documentation
- π³ Dockerized: Containerized application for consistent deployments
- π CI/CD Pipeline: Automated deployment using GitHub Actions
- βοΈ AWS Deployment: Scalable cloud infrastructure with EC2 and ECR
- Python 3.11
- FastAPI (API framework)
- Uvicorn (ASGI server)
- Streamlit (Web interface)
- EuriAI (Generative AI API)
- Pinecone (Vector database)
- LangChain (LLM framework)
- PyTorch (ML operations)
- EasyOCR (Text extraction)
- PyMuPDF (PDF processing)
- AWS EC2 (Compute)
- AWS S3 (Storage)
- AWS ECR (Container registry)
- Docker (Containerization)
- GitHub Actions (CI/CD)
- Boto3 (AWS SDK)
- python-dotenv (Environment management)
- python-multipart (File upload handling)
FinEduGuide/
β
βββ main.py # FastAPI application entry point
βββ streamlit_app.py # Streamlit frontend application
βββ requirements.txt # Python dependencies
βββ setup.py # Package setup configuration
βββ Dockerfile # Docker configuration
βββ README.md # Project documentation
βββ LICENSE # License file
β
βββ data/ # Data directory
β βββ RBI_SEBI_Finance_Education_Content.txt
β
βββ src/ # Source code
β βββ __init__.py
β βββ logger.py # Logging configuration
β βββ exception.py # Custom exception handling
β β
β βββ components/ # Core components
β β βββ __init__.py
β β βββ input_handler.py # Input processing
β β βββ generative_ai.py # AI model integration
β β βββ rag_engine.py # RAG implementation
β β βββ vector_db_client.py # Pinecone operations
β β βββ content_formatter.py # Content formatting
β β βββ S3_storage_service.py # AWS S3 operations
β β
β βββ config/ # Configuration modules
β β βββ __init__.py
β β
β βββ utils/ # Utility functions
β βββ __init__.py
β βββ process_file_utils.py # File processing utilities
β βββ prompt_templates.py # AI prompt templates
β
βββ logs/ # Application logs
The FastAPI backend provides the following endpoints:
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload-file |
Upload financial education documents (PDF/TXT) |
| POST | /generate-content |
Generate AI responses based on user queries |
| GET | /docs |
Interactive API documentation (Swagger UI) |
| GET | /redoc |
Alternative API documentation (ReDoc) |
Swagger Documentation: Visit /docs endpoint for interactive API testing
Backend (FastAPI)
- Platform: AWS EC2 (Ubuntu)
- Container: Docker image stored in AWS ECR
- CI/CD: GitHub Actions for automated deployments
- Access: http://13.200.38.182:8080
Frontend (Streamlit)
- Platform: Streamlit Cloud
- Access: https://fineduguide-ai-assistant.streamlit.app/
Infrastructure
- Storage: AWS S3 (Document storage)
- Vector DB: Pinecone Cloud
- CI/CD: GitHub Actions with self-hosted runner on EC2
- Python 3.11
- Conda or venv
- AWS Account
- Pinecone Account
- EuriAI API Key
1. Clone the Repository
git clone https://github.com/vineet416/FinEduGuide-AI-Assistant.git
cd FinEduGuide-AI-Assistant2. Create Virtual Environment
conda create -p venv python==3.11 -y
conda activate venv/3. Install Dependencies
pip install -r requirements.txt4. Set Up Pinecone
- Create account at https://www.pinecone.io/
- Create an index named:
fineduguide-index - Copy your API key
5. Set Up EuriAI
- Get API key from https://euron.one/euri
- Note: This is a paid service
6. Set Up AWS
- Login to AWS Console
- Create IAM user with policies:
AmazonS3FullAccessAmazonEC2ContainerRegistryFullAccessAmazonEC2FullAccess
- Generate Access Key and Secret Access Key (CLI)
- Create S3 bucket:
fineduguide-bucket
7. Configure Environment Variables
Create .env file in root directory:
EURIAI_API_KEY=your_euriai_api_key_here
PINECONE_API_KEY=your_pinecone_api_key_here
AWS_ACCESS_KEY_ID=your_aws_access_key_here
AWS_SECRET_ACCESS_KEY=your_aws_secret_key_here8. Run FastAPI Server
uvicorn main:app --reloadAPI will be available at: http://127.0.0.1:8000
9. Configure Streamlit
Create .streamlit/secrets.toml:
FASTAPI_BASE_URL = "http://127.0.0.1:8000"10. Run Streamlit App
streamlit run streamlit_app.pyApp will open at: http://localhost:8501
11. Start Using the App
- Upload financial education documents via Streamlit UI
- Documents are processed and stored in Pinecone (vector embeddings) and AWS S3
- Ask questions in the chatbox to get AI-generated answers
1. Create ECR Repository
- Navigate to AWS ECR console
- Create a new repository
- Save the repository URI
2. Launch EC2 Instance
- Instance type: Minimum 8GB RAM, 2 vCPU
- OS: Ubuntu
- Configure security groups (allow ports 8080, 22)
3. Install Docker on EC2
sudo apt-get update -y
sudo apt-get upgrade
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker4. Configure Self-Hosted Runner
- Go to GitHub repo β Settings β Actions β Runners
- Click "New self-hosted runner"
- Select OS: Linux
- Run provided commands on EC2 instance
5. Set Up GitHub Secrets
Add the following secrets in: Settings β Secrets and variables β Actions
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION(e.g., ap-south-1)ECR_REPO(your ECR repository name)EURIAI_API_KEYPINECONE_API_KEY
6. Deploy to AWS
git add .
git commit -m "Deploy to AWS"
git push origin main7. Monitor Deployment
- Check Actions tab in GitHub repository
- Once successful, access FastAPI at:
http://<EC2-PUBLIC-IP>:8080/docs
8. Deploy Streamlit to Cloud
- Go to Streamlit Cloud
- Connect your GitHub repository
- Add secret in Streamlit dashboard:
FASTAPI_BASE_URL = "http://<EC2-PUBLIC-IP>:8080"π Congratulations! Your FinEduGuide AI Assistant is now deployed!
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Vineet Patel
- π§ Email: vineetpatel468@gmail.com
- π GitHub: @vineet416
- πΌ LinkedIn: @vineet416
This project is licensed under the terms specified in the LICENSE file.
Give a βοΈ if this project helped you!
