Infomagier
Infomagier

Reputation: 329

HuggingFace Trainer do predictions

I've been fine-tuning a Model from HuggingFace via the Trainer-Class. I went through the Training Process via trainer.train() and also tested it with trainer.evaluate().

My question is how I can run the Model on specific data. In case of a classification text I'm looking for sth like this:

trainer.predict('This text is about football')
output = 'Sports'

Do I need to save the Model first or is there a command I can use directly? What's the most simple way on running the fine-tuned Model?

Upvotes: 2

Views: 8390

Answers (0)

Related Questions