ktgiahieu/maccrobat2018_2020
Viewer โข Updated โข 400 โข 79 โข 1
How to use mdecot/RobotDocNLP with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="mdecot/RobotDocNLP") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("mdecot/RobotDocNLP")
model = AutoModelForTokenClassification.from_pretrained("mdecot/RobotDocNLP", device_map="auto")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("mdecot/RobotDocNLP")
model = AutoModelForTokenClassification.from_pretrained("mdecot/RobotDocNLP", device_map="auto")
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="mdecot/RobotDocNLP")