NLP-Assistant / README.md
zykrix
Fixing all the error
1eb63ff

A newer version of the Gradio SDK is available: 5.27.1

Upgrade
metadata
title: NLP Assistant
emoji: 🧠
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.27.0
app_file: app.py
python_version: 3.11
hardware: cpu-basic
pinned: false

πŸ€– NLP Assistant

A lightweight NLP-powered assistant that provides summarization, news classification, and event detection from text, PDF uploads, or article URLs. Built using Transformers, KeyBERT, Streamlit, and pdfplumber.


πŸš€ Features

  • πŸ“„ Summarization (with sliding window + meta-summary)
  • πŸ—žοΈ News Classification using DistilBERT
  • πŸ“Œ Event Detection with KeyBERT, spaCy & TF-IDF
  • πŸ“₯ Upload PDFs
  • πŸ”— Input article URLs using newspaper3k

πŸ› οΈ Tech Stack

  • Streamlit - Web UI
  • Transformers (HuggingFace)
  • KeyBERT
  • pdfplumber for PDF extraction
  • PyTorch (auto GPU/CPU)
  • scikit-learn & sentence-transformers for KeyBERT
  • newspaper3k for url support
  • spacy & TfidfVectorizer for Extracting NER

πŸ“ Folder Structure

nlp_assistant/ β”œβ”€β”€ app.py # Main Streamlit app β”œβ”€β”€ requirements.txt # Python dependencies β”œβ”€β”€ README.md # Project documentation β”œβ”€β”€ assets/ # Optional test PDFs β”‚ └── sample.pdf └── modules/ # Modularized logic β”œβ”€β”€ init.py β”œβ”€β”€ classifier.py # News classification β”œβ”€β”€ event_detector.py # Event detection β”œβ”€β”€ models.py # Model loading β”œβ”€β”€ summarizer.py # Summarization └── utils.py # PDF reader


πŸ§‘β€πŸ’» Getting Started

1. Clone the repo

git clone https://github.com/Raahul-Thakur/NLP-Assistant.git
cd NLP-ASSISTANT

2. Requirements

pip install -r requirements.txt

3. Run the app

streamlit run app.py

Models Used Task Model Summarization pszemraj/led-large-book-summary (Long LED Transformer) Classification Event Detection KeyBERT with sentence-transformers


Let me know if you’d like to:

  • Add badges (stars, forks, license)
  • Include a demo GIF/screenshot
  • contact

LinkedIn: https://www.linkedin.com/in/rahul-t-171458190/ Instagram: https://www.instagram.com/rah.ipynb Gmail: [email protected]


Deployment