Spaces:
Running
Running
File size: 2,200 Bytes
1eb63ff a7fed31 1eb63ff a7fed31 1eb63ff 4a86a4b 0a89dc3 4a86a4b 0a89dc3 4a86a4b 0a89dc3 4a86a4b 0a89dc3 4a86a4b 0a89dc3 4a86a4b 0a89dc3 ed4eb4d 1eb63ff |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
---
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
```bash
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 |