Spaces:
Sleeping
Sleeping
| from config import * | |
| def load_pipeline(): | |
| """ | |
| Load the pipeline | |
| """ | |
| return pipeline("token-classification", model=MODEL_PATH) | |
| def annotate(entity): | |
| """ | |
| Annotate the text | |
| """ | |
| return (entity["word"].replace('▁',''), entity["entity"]) | |