Pavankalyan commited on
Commit
88df69b
1 Parent(s): c6842a5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -27,8 +27,8 @@ class ZeroShotTextClassifier:
27
  huggingface_predictions = cls.classifier(text, candidate_labels)
28
  # Create our own prediction object with the best label
29
  max_index = np.argmax(huggingface_predictions["scores"])
30
- label = huggingface_predictions["labels"][max_index]
31
- score = huggingface_predictions["scores"][max_index]
32
  return {"label": label, "score": score}
33
 
34
  RUN python -c "from transformers import pipeline; classifier = pipeline('zero-shot-classification', model='facebook/bart-large-mnli')"
 
27
  huggingface_predictions = cls.classifier(text, candidate_labels)
28
  # Create our own prediction object with the best label
29
  max_index = np.argmax(huggingface_predictions["scores"])
30
+ label = huggingface_predictions['labels'][max_index]
31
+ score = huggingface_predictions['scores'][max_index]
32
  return {"label": label, "score": score}
33
 
34
  RUN python -c "from transformers import pipeline; classifier = pipeline('zero-shot-classification', model='facebook/bart-large-mnli')"