Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.33.2
metadata
title: Ner Annotation
emoji: π
colorFrom: pink
colorTo: green
sdk: gradio
sdk_version: 5.31.0
app_file: app.py
pinned: false
short_description: the ui for annotation ner for healthcare
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
NER Annotation Tool
A powerful tool for annotating text with named entities using GLiNER models. This tool provides both automatic annotation using pre-trained models and a manual annotation interface for reviewing and correcting the results.
Features
- Automatic NER annotation using GLiNER models
- Support for multiple pre-trained models
- Interactive dataset viewer and editor
- Export/import functionality for annotated data
- Integration with Hugging Face Hub for dataset sharing
- Support for various file formats (JSON, CoNLL, TXT)
Installation
- Clone the repository:
git clone https://github.com/yourusername/ner-annotation.git
cd ner-annotation
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install the package:
pip install -e .
Usage
- Start the application:
python -m ner_annotation.app
The application will open in your default web browser with two main tabs:
- Auto Annotation: Upload text files and automatically annotate them using GLiNER models
- Dataset Viewer: Review, edit, and validate annotated data
Auto Annotation
- Upload a text file (one sentence per line)
- Select a GLiNER model
- Enter the entity labels to detect (comma-separated)
- Adjust the confidence threshold
- Optionally add a prompt
- Click "Annotate Data"
Dataset Viewer
- Load a dataset (local or from Hugging Face)
- Navigate through examples using the slider or buttons
- Edit annotations as needed
- Validate examples
- Save the dataset locally or to Hugging Face Hub
Configuration
Create a .env
file in the project root with your Hugging Face token:
HUGGINGFACE_ACCESS_TOKEN=your_token_here
Available Models
BookingCare/gliner-multi-healthcare
knowledgator/gliner-multitask-large-v0.5
knowledgator/gliner-multitask-base-v0.5
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.