Skip to content

Instantly share code, notes, and snippets.

@tomasonjo
Created December 27, 2022 20:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasonjo/8255418559ee70acc3731177f7352375 to your computer and use it in GitHub Desktop.
Save tomasonjo/8255418559ee70acc3731177f7352375 to your computer and use it in GitHub Desktop.
tokenizer = AutoTokenizer.from_pretrained("yanekyuk/bert-uncased-keyword-extractor")
model = AutoModelForTokenClassification.from_pretrained(
"yanekyuk/bert-uncased-keyword-extractor"
)
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment