CoolFace
Apppublic

ashish-soni08/Named-Entity-Recognition

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
2likes
App README

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.

[image]

๐Ÿš€ 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

bash
Python 3.8+
pip

Installation

  1. 1.Clone the repository:
bash
git clone https://github.com/Ashish-Soni08/named-entity-recognition-app.git
cd ner-app
  1. 1.Install dependencies:
bash
pip install -r requirements.txt
  1. 1.Run the application:
bash
python app.py
  1. 1.Open your browser and navigate to http://localhost:7860

๐Ÿ“‹ Usage

  1. 1.Input Text: Enter or paste the text you want to analyze in the "Text to find entities" box
  2. 2.Process: Click the "Submit" button to perform Named Entity Recognition
  3. 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 for the Transformers library and model hosting
  • โ€”Gradio for the web interface framework
  • โ€”dslim for the fine-tuned BERT-NER model

๐Ÿ“ž Contact

Ashish Soni - ashish.soni2091@gmail.com

Project Link: Github