https://github.com/nna301023/clarus
Sharing Session Dibimbing X ExaBytes 2025
https://github.com/nna301023/clarus
flask generative-ai groq
Last synced: about 1 month ago
JSON representation
Sharing Session Dibimbing X ExaBytes 2025
- Host: GitHub
- URL: https://github.com/nna301023/clarus
- Owner: NnA301023
- License: apache-2.0
- Created: 2025-03-06T06:14:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T07:03:12.000Z (over 1 year ago)
- Last Synced: 2025-03-06T07:46:03.429Z (over 1 year ago)
- Topics: flask, generative-ai, groq
- Language: HTML
- Homepage:
- Size: 685 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ค Clarus (ExaBytes RAG Demo Application)




A modern web application implementing Retrieval Augmented Generation (RAG) using Flask and Tailwind CSS. Upload documents and get AI-powered answers based on their content.
[Features](#features) โข
[Quick Start](#quick-start) โข
[Installation](#installation) โข
[Usage](#usage) โข
[Architecture](#architecture) โข
[Development](#development)
## โจ Features
- ๐ **Document Processing**
- Support for PDF and TXT files
- Automatic text chunking and embedding
- Efficient vector storage with ChromaDB
- ๐ **Advanced RAG Implementation**
- Powered by Groq's Mixtral-8x7b model
- Sentence transformers for embeddings
- Context-aware question answering
- ๐จ **Modern UI/UX**
- Clean, responsive design with Tailwind CSS
- Real-time loading states
- Toast notifications for feedback
- Drag-and-drop file upload
## ๐ Quick Start
```bash
# Clone the repository
git clone https://github.com/yourusername/clarus.git
cd clarus
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
uv pip install -e .
# Set up environment variables
cp app/.env.example app/.env
# Edit app/.env with your API keys
# Run the application
python main.py
```
Visit `http://localhost:5000` in your browser to start using the application.
## ๐ ๏ธ Installation
### Prerequisites
- Python 3.11+
- uv package manager (recommended) or pip
- Groq API key for LLM access
### Detailed Setup
1. **Environment Setup**
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
2. **Install Dependencies**
Using uv (recommended):
```bash
uv pip install -e .
```
Using pip:
```bash
pip install -r requirements.txt
```
3. **Configure Environment Variables**
```bash
cp app/.env.example app/.env
```
Edit `app/.env` and add:
```
SECRET_KEY=your-secret-key
GROQ_API_KEY=your-groq-api-key
```
## ๐ฏ Usage
1. **Upload Documents**
- Click the upload area or drag and drop files
- Supported formats: PDF, TXT
- Wait for the success notification
2. **Ask Questions**
- Enter your question in the text area
- Click "Get Answer"
- View AI-generated response based on your documents
## ๐๏ธ Architecture
```
.
โโโ app/ # Application package
โ โโโ templates/ # HTML templates
โ โโโ static/ # Static files
โ โโโ utils/ # Utility modules
โ โ โโโ rag.py # RAG implementation
โ โโโ routes.py # Flask routes
โโโ main.py # Application entry point
โโโ pyproject.toml # Project metadata and dependencies
โโโ requirements.txt # Direct dependencies
```
## ๐งช Development
### Tech Stack
- **Backend**
- Flask: Web framework
- LangChain: RAG implementation
- ChromaDB: Vector storage
- Sentence Transformers: Text embeddings
- Groq: LLM provider
- **Frontend**
- Tailwind CSS: Styling
- Vanilla JavaScript: Interactivity
### Development Tools
```bash
# Install development dependencies
uv pip install -e ".[dev]"
# Format code
black app/
isort app/
# Lint code
flake8 app/
```
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
---
Made with โค๏ธ using Flask, LangChain, and Groq