Spaces:
Sleeping
Sleeping
| 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: raahul.thakurr01@gmail.com | |
| --- | |
| ## Deployment |