ashish-soni08's picture
Update README.md
dfadaa9 verified
---
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.
![Demo Screenshot](ner_logo.png)
## πŸš€ 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)