Open jomiguelcarv opened 1 month ago
For anyone facing the same issue, solved by making the following changes:
import torch
from accord_nlp.text_classification.ner.ner_model import NERModel
def run():
torch.multiprocessing.freeze_support()
model = NERModel('roberta', 'ACCORD-NLP/ner-roberta-large', use_cuda=False)
predictions, raw_outputs = model.predict(['The gradient of the passageway should not exceed five per cent.'])
print(predictions)
if __name__ == '__main__':
run()
Hey! Thanks for this work, brilliant! Im trying to run your model on a macbook m1 (no cuda) with following code:
But get this error:
Any leads?