shreyash-jain27/INT344

Python

0

11 commits

updated Jan 5, 2026

See the code

README

Layout-Aware Summarization of Annual Reports for Multilingual India (v1.0 Stable)

An intelligent, robust system to extract, analyze, and summarize Indian annual reports with multilingual support and high-performance document processing.

πŸš€ Version 1.0 Highlights

  • Optimized Performance: Single-pass document analysis with localized caching and instant tab switching.
  • Lazy Loading: App startup is nearly instant; heavy AI models are loaded only when requested.
  • Improved Stability: Robust error boundaries prevent crashes during model loading or processing failures.
  • Memory Management: Automatic garbage collection and session purging when switching documents.

πŸ› οΈ Features

  • Advanced PDF Processing: High-fidelity text extraction using multiple engines (pdfplumber, PyPDF2).
  • Layout Analysis: Page structure visualization with bounding box identification.
  • Multilingual Support:
    • Automatic Indian language detection.
    • Summarization for Hindi, Tamil, Telugu, Bengali, Marathi, Gujarati, Kannada, and Malayalam.
    • IndicBART Support: High-performance translation and summarization using local AI models.
  • Interactive Visuals: Plotly charts for section distribution and keyword frequency.
  • Export Options: Professional DOCX, CSV, and Text reports.

πŸ› οΈ Installation & Setup

  1. Clone & Environment

    git clone <repository-url>
    cd annual_report_summarizer
    python -m venv venv
    source venv/bin/activate  # atau .\venv\Scripts\activate
    
  2. Dependencies

    pip install -r requirements.txt
    
  3. Resources

    • Ensure tesseract is installed for OCR features.
    • The app will automatically download ~1.5GB of AI models on the first run of "Direct" multilingual summarization.

πŸƒ Usage

streamlit run app.py

πŸ” Troubleshooting

  • indic_nlp_resources: If you see errors about missing Indic resources, ensure the indic_nlp_resources folder is present in the root directory.
  • Memory Issues: For large PDFs (>100 pages), use a machine with at least 8GB of RAM if using direct multilingual models.
  • Model Vulnerability: If you see torch.load warnings, this stable version has been patched to use safetensors for all AI model loading.

πŸ“ Project Structure

annual_report_summarizer/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ pdf_processor.py         # Advanced PDF extraction & logic
β”‚   β”œβ”€β”€ layout_analyzer.py       # Visual structure analysis
β”‚   β”œβ”€β”€ multilingual_summarizer.py # BART-based Indian language support
β”‚   β”œβ”€β”€ language_detector.py    # Auto-detection for 10+ languages
β”‚   β”œβ”€β”€ translator.py           # IndicBART & Google fallbacks
β”‚   └── summarizer.py           # Extractive & Abstractive engines
β”œβ”€β”€ app.py                      # Main Streamlit interface
└── requirements.txt            # Project dependencies

πŸ“„ License

MIT License - 2025

shreyash-jain27/INT344

Python

0

11 commits

updated Jan 5, 2026

See the code

README

Layout-Aware Summarization of Annual Reports for Multilingual India (v1.0 Stable)

An intelligent, robust system to extract, analyze, and summarize Indian annual reports with multilingual support and high-performance document processing.

πŸš€ Version 1.0 Highlights

  • Optimized Performance: Single-pass document analysis with localized caching and instant tab switching.
  • Lazy Loading: App startup is nearly instant; heavy AI models are loaded only when requested.
  • Improved Stability: Robust error boundaries prevent crashes during model loading or processing failures.
  • Memory Management: Automatic garbage collection and session purging when switching documents.

πŸ› οΈ Features

  • Advanced PDF Processing: High-fidelity text extraction using multiple engines (pdfplumber, PyPDF2).
  • Layout Analysis: Page structure visualization with bounding box identification.
  • Multilingual Support:
    • Automatic Indian language detection.
    • Summarization for Hindi, Tamil, Telugu, Bengali, Marathi, Gujarati, Kannada, and Malayalam.
    • IndicBART Support: High-performance translation and summarization using local AI models.
  • Interactive Visuals: Plotly charts for section distribution and keyword frequency.
  • Export Options: Professional DOCX, CSV, and Text reports.

πŸ› οΈ Installation & Setup

  1. Clone & Environment

    git clone <repository-url>
    cd annual_report_summarizer
    python -m venv venv
    source venv/bin/activate  # atau .\venv\Scripts\activate
    
  2. Dependencies

    pip install -r requirements.txt
    
  3. Resources

    • Ensure tesseract is installed for OCR features.
    • The app will automatically download ~1.5GB of AI models on the first run of "Direct" multilingual summarization.

πŸƒ Usage

streamlit run app.py

πŸ” Troubleshooting

  • indic_nlp_resources: If you see errors about missing Indic resources, ensure the indic_nlp_resources folder is present in the root directory.
  • Memory Issues: For large PDFs (>100 pages), use a machine with at least 8GB of RAM if using direct multilingual models.
  • Model Vulnerability: If you see torch.load warnings, this stable version has been patched to use safetensors for all AI model loading.

πŸ“ Project Structure

annual_report_summarizer/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ pdf_processor.py         # Advanced PDF extraction & logic
β”‚   β”œβ”€β”€ layout_analyzer.py       # Visual structure analysis
β”‚   β”œβ”€β”€ multilingual_summarizer.py # BART-based Indian language support
β”‚   β”œβ”€β”€ language_detector.py    # Auto-detection for 10+ languages
β”‚   β”œβ”€β”€ translator.py           # IndicBART & Google fallbacks
β”‚   └── summarizer.py           # Extractive & Abstractive engines
β”œβ”€β”€ app.py                      # Main Streamlit interface
└── requirements.txt            # Project dependencies

πŸ“„ License

MIT License - 2025