This project is a simple desktop application built with Tkinter and Hugging Face Transformers.
It provides a graphical interface for running Named Entity Recognition (NER) on text input using a pretrained BERT model.
- Desktop GUI built with Tkinter
- Uses the
dslim/bert-base-NERmodel from Hugging Face - Groups entities into meaningful tokens
- Shows detected entities with labels and confidence scores
- Scrollable input and output boxes for longer text
- Python 3.8 or newer
- Tkinter (included with most Python installations)
- Hugging Face Transformers
- PyTorch (recommended)
Install dependencies:
pip install transformers torchClone the repository and run the script:
git clone https://github.com/your-username/ner-tkinter-gui.git
cd ner-tkinter-gui
python ner_gui.pySteps:
- Enter or paste text into the input box.
- Click Run NER.
- View extracted entities in the output box.
Input:
Barack Obama was born in Hawaii and served as President of the United States.
Output:
Barack Obama → PER (0.99)
Hawaii → LOC (0.99)
United States → LOC (0.99)
President → MISC (0.85)
ner-tkinter-gui/
│
├── NER_prompt.py # Main application script
└── README.md # Project documentation
This project is licensed under the MIT License.