Spaces:
Running
on
Zero
Running
on
Zero
title: Named Entity Recognition | |
emoji: ππ·οΈ | |
colorFrom: blue | |
colorTo: yellow | |
sdk: gradio | |
sdk_version: 5.31.0 | |
app_file: app.py | |
pinned: false | |
license: apache-2.0 | |
# Named Entity Recognition (NER) App π·οΈ | |
A web-based Named Entity Recognition tool that automatically identifies and highlights entities like names, locations, organizations, and more from text using state-of-the-art NLP models. Built with Gradio and deployed on Hugging Face Spaces. | |
 | |
## π Live Demo | |
Try the app: [Named-Entity-Recognition](https://huggingface.co/spaces/ashish-soni08/Named-Entity-Recognition) | |
## β¨ Features | |
- **Automatic Entity Detection**: Instantly identify persons, locations, organizations, and miscellaneous entities | |
- **Visual Highlighting**: Entities are color-coded and highlighted for easy identification | |
- **Real-time Processing**: Get results in seconds with pre-trained BERT model | |
- **Clean Interface**: Intuitive web UI built with Gradio | |
- **Mobile Responsive**: Works seamlessly on desktop and mobile devices | |
## π οΈ Technology Stack | |
- **Backend**: Python, Hugging Face Transformers | |
- **Frontend**: Gradio | |
- **Model**: [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER) | |
- **Deployment**: Hugging Face Spaces | |
## πββοΈ Quick Start | |
### Prerequisites | |
```bash | |
Python 3.8+ | |
pip | |
``` | |
### Installation | |
1. Clone the repository: | |
```bash | |
git clone https://github.com/Ashish-Soni08/named-entity-recognition-app.git | |
cd ner-app | |
``` | |
2. Install dependencies: | |
```bash | |
pip install -r requirements.txt | |
``` | |
3. Run the application: | |
```bash | |
python app.py | |
``` | |
4. Open your browser and navigate to `http://localhost:7860` | |
## π Usage | |
1. **Input Text**: Enter or paste the text you want to analyze in the "Text to find entities" box | |
2. **Process**: Click the "Submit" button to perform Named Entity Recognition | |
3. **View Results**: Identified entities will be highlighted with different colors based on their type | |
### Entity Types Detected | |
- **PER** (Person): Names of people | |
- **LOC** (Location): Geographic locations, cities, countries | |
- **ORG** (Organization): Companies, institutions, organizations | |
- **MISC** (Miscellaneous): Other named entities | |
### Example | |
**Input:** | |
``` | |
Apple Inc. is headquartered in Cupertino, California. Tim Cook is the current CEO of the company. | |
``` | |
**Output:** | |
``` | |
[Apple Inc.](ORG) is headquartered in [Cupertino](LOC), [California](LOC). [Tim Cook](PER) is the current CEO of the company. | |
``` | |
## π§ Model Information | |
This app uses **dslim/bert-base-NER**, a fine-tuned BERT model for Named Entity Recognition: | |
- **Architecture**: BERT-base | |
- **Parameters**: ~110 million parameters | |
- **Entity Types**: Person (PER), Location (LOC), Organization (ORG), Miscellaneous (MISC) | |
- **Performance**: F1-score of ~91% | |
## π Project Structure | |
``` | |
ner-app/ | |
βββ app.py # Main Gradio application | |
βββ requirements.txt # Python dependencies | |
βββ README.md # Project documentation | |
``` | |
## π License | |
This project is licensed under the Apache License 2.0 | |
## π Acknowledgments | |
- [Hugging Face](https://huggingface.co/) for the Transformers library and model hosting | |
- [Gradio](https://gradio.app/) for the web interface framework | |
- [dslim](https://huggingface.co/dslim) for the fine-tuned BERT-NER model | |
## π Contact | |
Ashish Soni - [email protected] | |
Project Link: [Github](https://github.com/Ashish-Soni08/named-entity-recognition-app) |