Skip to content

Commit

Permalink
classifier: remove print on predict
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Aug 2, 2024
1 parent fd9bcd0 commit 86e3221
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inspire_classifier/domain/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ def load_trained_classifier_weights(self, trained_classifier_path):
self.model = load_learner(trained_classifier_path, cpu=self.cpu)

def predict(self, text, temperature=0.25):
prediction_scores = self.model.predict(text)
with self.model.no_bar(), self.model.no_logging():
prediction_scores = self.model.predict(text)
return softmax(prediction_scores[-1].numpy(), temperature)

def calculate_f1_for_validation_dataset(self):
Expand Down

0 comments on commit 86e3221

Please sign in to comment.