Spaces:
Running
on
Zero
Running
on
Zero
A newer version of the Gradio SDK is available:
5.33.0
metadata
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
β¨ 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
- Deployment: Hugging Face Spaces
πββοΈ Quick Start
Prerequisites
Python 3.8+
pip
Installation
- Clone the repository:
git clone https://github.com/Ashish-Soni08/named-entity-recognition-app.git
cd ner-app
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Open your browser and navigate to
http://localhost:7860
π Usage
- Input Text: Enter or paste the text you want to analyze in the "Text to find entities" box
- Process: Click the "Submit" button to perform Named Entity Recognition
- 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 for the Transformers library and model hosting
- Gradio for the web interface framework
- dslim for the fine-tuned BERT-NER model
π Contact
Ashish Soni - [email protected]
Project Link: Github