ashish-soni08 commited on
Commit
04964b8
Β·
verified Β·
1 Parent(s): 34e29ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +104 -17
README.md CHANGED
@@ -4,34 +4,121 @@ emoji: πŸ”πŸ·οΈ
4
  colorFrom: blue
5
  colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 4.41.0
8
  app_file: app.py
9
  pinned: false
10
  license: afl-3.0
11
  ---
12
 
13
- # Named Entity Recognition (NER) App
14
 
15
- This application provides a simple interface to perform Named Entity Recognition (NER) on text using a pre-trained model from Hugging Face's Transformers library. The model used under the hood is `dslim/bert-base-NER`, which is designed to identify entities such as names, locations, organizations, and more in a given text.
16
 
17
- ## Features
18
 
19
- - **Named Entity Recognition**: Automatically identify and highlight entities within a given text.
20
- - **User-Friendly Interface**: Built using Gradio for an easy-to-use web interface.
21
 
22
- ## Model
23
 
24
- - **Model Used**: [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER)
25
- - **Framework**: Hugging Face Transformers
26
 
27
- ## Software Packages
 
 
 
 
28
 
29
- - **Gradio**: Used to create the web interface.
30
- - **Transformers**: Used for model inference.
31
- - **Spaces**: Utilized for GPU acceleration during model execution.
32
 
33
- ## How to Use
 
 
 
34
 
35
- 1. Enter the text you want to analyze in the "Text to find entities" textbox.
36
- 2. Click "Submit" to perform Named Entity Recognition.
37
- 3. The identified entities will be highlighted in the output box.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  colorFrom: blue
5
  colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 5.31.0
8
  app_file: app.py
9
  pinned: false
10
  license: afl-3.0
11
  ---
12
 
13
+ # Named Entity Recognition (NER) App 🏷️
14
 
15
+ 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.
16
 
17
+ ![Demo Screenshot](ner_logo.png)
18
 
19
+ ## πŸš€ Live Demo
 
20
 
21
+ Try the app: [Named-Entity-Recognition](https://huggingface.co/spaces/ashish-soni08/Named-Entity-Recognition)
22
 
23
+ ## ✨ Features
 
24
 
25
+ - **Automatic Entity Detection**: Instantly identify persons, locations, organizations, and miscellaneous entities
26
+ - **Visual Highlighting**: Entities are color-coded and highlighted for easy identification
27
+ - **Real-time Processing**: Get results in seconds with pre-trained BERT model
28
+ - **Clean Interface**: Intuitive web UI built with Gradio
29
+ - **Mobile Responsive**: Works seamlessly on desktop and mobile devices
30
 
31
+ ## πŸ› οΈ Technology Stack
 
 
32
 
33
+ - **Backend**: Python, Hugging Face Transformers
34
+ - **Frontend**: Gradio
35
+ - **Model**: [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER)
36
+ - **Deployment**: Hugging Face Spaces
37
 
38
+ ## πŸƒβ€β™‚οΈ Quick Start
39
+
40
+ ### Prerequisites
41
+
42
+ ```bash
43
+ Python 3.8+
44
+ pip
45
+ ```
46
+
47
+ ### Installation
48
+
49
+ 1. Clone the repository:
50
+ ```bash
51
+ git clone https://github.com/Ashish-Soni08/named-entity-recognition-app.git
52
+ cd ner-app
53
+ ```
54
+
55
+ 2. Install dependencies:
56
+ ```bash
57
+ pip install -r requirements.txt
58
+ ```
59
+
60
+ 3. Run the application:
61
+ ```bash
62
+ python app.py
63
+ ```
64
+
65
+ 4. Open your browser and navigate to `http://localhost:7860`
66
+
67
+ ## πŸ“‹ Usage
68
+
69
+ 1. **Input Text**: Enter or paste the text you want to analyze in the "Text to find entities" box
70
+ 2. **Process**: Click the "Submit" button to perform Named Entity Recognition
71
+ 3. **View Results**: Identified entities will be highlighted with different colors based on their type
72
+
73
+ ### Entity Types Detected
74
+
75
+ - **PER** (Person): Names of people
76
+ - **LOC** (Location): Geographic locations, cities, countries
77
+ - **ORG** (Organization): Companies, institutions, organizations
78
+ - **MISC** (Miscellaneous): Other named entities
79
+
80
+ ### Example
81
+
82
+ **Input:**
83
+ ```
84
+ Apple Inc. is headquartered in Cupertino, California. Tim Cook is the current CEO of the company.
85
+ ```
86
+
87
+ **Output:**
88
+ ```
89
+ [Apple Inc.](ORG) is headquartered in [Cupertino](LOC), [California](LOC). [Tim Cook](PER) is the current CEO of the company.
90
+ ```
91
+
92
+ ## 🧠 Model Information
93
+
94
+ This app uses **dslim/bert-base-NER**, a fine-tuned BERT model for Named Entity Recognition:
95
+
96
+ - **Architecture**: BERT-base
97
+ - **Parameters**: ~110 million parameters
98
+ - **Entity Types**: Person (PER), Location (LOC), Organization (ORG), Miscellaneous (MISC)
99
+ - **Performance**: F1-score of ~91%
100
+
101
+ ## πŸ“ Project Structure
102
+
103
+ ```
104
+ ner-app/
105
+ β”œβ”€β”€ app.py # Main Gradio application
106
+ β”œβ”€β”€ requirements.txt # Python dependencies
107
+ β”œβ”€β”€ README.md # Project documentation
108
+ ```
109
+
110
+ ## πŸ“„ License
111
+
112
+ This project is licensed under the AFL-3.0 License - see the [LICENSE](LICENSE) file for details.
113
+
114
+ ## πŸ™ Acknowledgments
115
+
116
+ - [Hugging Face](https://huggingface.co/) for the Transformers library and model hosting
117
+ - [Gradio](https://gradio.app/) for the web interface framework
118
+ - [dslim](https://huggingface.co/dslim) for the fine-tuned BERT-NER model
119
+
120
+ ## πŸ“ž Contact
121
+
122
+ Ashish Soni - [email protected]
123
+
124
+ Project Link: [Github](https://github.com/Ashish-Soni08/named-entity-recognition-app)