This is a full-stack web application that enables users to upload PDF documents and ask questions, with answers generated using Groq's LLaMA-3.1 model based on the document context. The backend also provides secure user authentication, semantic search via FAISS, and PDF indexing using sentence-transformers. The frontend is built in Angular for a smooth user experience.
- User Authentication with secure password hashing (signup/login)
- PDF Upload & Processing using pdfplumber
- AI Question Answering using Groq's LLaMA-3.1
- Semantic Search using FAISS and SentenceTransformers
- Contextual Answers pulled from most relevant PDF chunks
- MongoDB Integration for user storage
Layer | Technology |
---|---|
Frontend | Angular |
Backend | Flask + Flask-RESTful + CORS |
Database | MongoDB |
AI Models | Groq LLaMA-3.1 + SentenceTransformers |
Search | FAISS |
pdfplumber |
Ensure the following are installed on your system:
- Node.js (v14+)
- Angular CLI (v12+)
- Python (v3.8+)
- pip (Python package manager)
- MongoDB Compass (or MongoDB installed locally)
- Groq (for API integrations)
To use the Groq API in this project, you need to obtain an API key. Follow the steps below:
-
Visit the Groq API key management page:
Obtain API Key -
Log in with your credentials or create a new account if you don’t have one.
-
Generate a new API key under your account settings.
-
Copy the API key to use in the project.
- Add the API key to the appropriate configuration variable:
GROQ_API_KEY = "your_api_key_here"
- Clone the repo.
cd Hackathon-2024
- Install the latest version of Angular
npm install -g @angular/cli
- Install the necessary packages using
npm install
- Run the server
The application will be accessible at http://localhost:4200/
ng serve
This document provides instructions to set up the backend for the hackathon project, developed using Flask with MongoDB and Groq for API handling.
Ensure the following are installed on your system:
- Python (v3.8+)
- pip (Python package manager)
- MongoDB Compass (or MongoDB installed locally)
- Groq (for API integrations)
- Navigate to the backend directory:
cd hackathon/backend
- Create a virtual environment (optional but recommended):
virtualenv venv venv\Scripts\activate
- Install the necessary packages using
pip install -r requirements.txt
- Run the server
flask run