Skip to content

Repository files navigation

🤖 Text Summarizer

Python FastAPI Transformers Docker License

ML Pipeline REST API NLP Project

🚀 Overview

A state-of-the-art text summarization application that leverages advanced NLP techniques and modern software engineering practices. This project demonstrates expertise in machine learning, API development, and production-grade software architecture.

🔥 Key Technical Features

  • End-to-End ML Pipeline: Implements a complete machine learning workflow from data ingestion to model deployment
  • Production-Ready API: FastAPI-based RESTful API with automatic documentation and type checking
  • Advanced NLP: Utilizes transformer-based models for high-quality text summarization
  • Scalable Architecture: Docker containerization for easy deployment and scaling
  • Robust Error Handling: Comprehensive logging and exception management
  • Data Validation: Automated data quality checks and preprocessing
  • Model Evaluation: Multiple metrics (ROUGE, BLEU) for comprehensive model assessment

🛠️ Technical Stack

  • Backend: Python, FastAPI
  • ML Framework: PyTorch, Transformers
  • NLP Tools: NLTK, Hugging Face Transformers
  • Data Processing: Pandas, NumPy
  • API Documentation: Swagger UI (automatic)
  • Containerization: Docker
  • Version Control: Git

📋 Prerequisites

  • Python 3.8+
  • pip (Python package installer)
  • Git
  • Docker (optional, for containerized deployment)

🚀 Quick Start

Local Development Setup

  1. Clone and Setup:
git clone https://github.com/yourusername/Text_Summarizer.git
cd Text_Summarizer
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Run the Application:
# Start the API server
python app.py

# Access the API documentation
# Open http://localhost:8080/docs in your browser

Docker Deployment

# Build and run with Docker
docker build -t text-summarizer .
docker run -p 8080:8080 text-summarizer

📁 Project Architecture

Text_Summarizer/
├── src/                    # Core application code
│   ├── components/        # ML pipeline components
│   ├── pipeline/          # Training and prediction pipelines
│   └── utils/             # Utility functions
├── config/                # Configuration management
├── research/             # Jupyter notebooks and experiments
├── main.py               # Training pipeline entry point
├── app.py                # FastAPI application
├── requirements.txt      # Project dependencies
├── setup.py             # Package configuration
└── Dockerfile           # Container configuration

🔌 API Endpoints

Endpoint Method Description
/ GET API documentation
/train GET Initiate model training
/predict POST Generate text summary

Example API Usage

import requests

# Generate summary
response = requests.post(
    "http://localhost:8080/predict",
    json={"text": "Your long text here..."}
)
summary = response.json()

🧪 Model Performance

The model is evaluated using multiple metrics:

  • ROUGE Score
  • BLEU Score

🤝 Contributing

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.

📝 License

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

👨‍💻 Author

Your Name


⭐ Star this repository if you find it useful!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages