Skip to content

DebasmitaBose0/Code-Genie-AI-Team-A-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 DebAI — Intelligent OCR & Chat Assistant

DebAI Banner Python Streamlit License

DebAI is a cutting-edge, dual-theme AI assistant built with Streamlit. It combines powerful OCR (Optical Character Recognition) capabilities with a sophisticated chat interface, wrapped in a stunning "Ultimate Glassmorphism" UI.

Whether you need to extract text from scanned documents, analyze PDFs, or have a conversation with a local (Ollama) or cloud-based (Gemini) LLM, DebAI handles it with style and precision.


✨ Key Features

🧠 Dual-Core AI Engine

  • Local Power: Seamless integration with Ollama for running privacy-focused local models (e.g., Gemma, Llama 3).
  • Cloud Fallback: Automatic fallback to Google Gemini when local models are unavailable.
  • Smart Language Detection: Automatically detects Hindi and Bengali inputs and instructs the model to respond in the appropriate script.

📄 Advanced OCR Suite

  • Image OCR: Extract text from images (.png, .jpg, .jpeg) using Tesseract.
  • PDF Analysis: Read and extract text from multi-page PDF documents.
  • Auto-Context: Extracted text is automatically fed into the chat context for immediate analysis.

🎨 Ultimate Glassmorphism UI

  • Dual Theme: Switch between a Cinematic Dark Mode and a Clean, Airy Light Mode.
  • Visuals: Features frosted glass cards, animated backgrounds (orbFloat), and smooth transitions.
  • Responsive: Perfectly optimized layout for various screen sizes.

🛠 Productivity Tools

  • PDF Export: Download your entire chat session as a formatted PDF report.
  • Hotkeys: Quick actions like "Send Last OCR" (Alt+S) for rapid workflows.

🛠️ Tech Stack


🚀 Getting Started

1. Prerequisites

Ensure you have the following installed:

  • Python 3.8+
  • Tesseract OCR:
    • Windows: Download and install the binary. Note the installation path (default: C:\Program Files\Tesseract-OCR\tesseract.exe).
  • Ollama (Optional, for local models):
    • Install Ollama and pull a model: ollama pull gemma:2b (or your preferred model).

2. Installation

Clone the repository and install dependencies:

git clone https://github.com/DebasmitaBose0/Code-Genie-AI-Team-A-.git
cd Code-Genie-AI-Team-A-
pip install -r requirements.txt

3. Configuration

DebAI works out-of-the-box with Ollama. To use Google Gemini as a fallback, set your API key:

Windows (PowerShell):

$env:GEMINI_API_KEY="your_api_key_here"

Linux/Mac:

export GEMINI_API_KEY="your_api_key_here"

(Optional) You can also configure the Tesseract path in AI.py if it differs from the default.

4. Run the App

Launch the application using Streamlit:

streamlit run AI.py

The app will open in your default browser at http://localhost:8501.


📖 Usage Guide

  1. Upload Documents: Use the sidebar or top tabs to upload Images or PDFs.
  2. Extract Text: The app will automatically extract text. You can choose to send it to the AI immediately or edit/review it.
  3. Chat: Type your queries in the chat bar. The AI has context of your uploaded documents.
  4. Switch Themes: Toggle between Light and Dark mode using the button in the top-right corner.
  5. Export: Click "Download Report (PDF)" in the sidebar to save your conversation.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❤️ by Debasmita Bose

About

Group project - 1. Aashritha Machipeddi 2. Anuj Upadhayay 3. Debasmita Bose 4. Dea Rani 5. Sahithi Boppa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages