Spaces:
Runtime error
Runtime error
kaushikbar
commited on
Commit
·
24f3ca1
1
Parent(s):
0188bfe
added explain
Browse files
app.py
CHANGED
@@ -168,9 +168,10 @@ def sequence_to_classify(sequence, labels):
|
|
168 |
puncts = list(string.punctuation)
|
169 |
|
170 |
model_expl = ZeroShotClassificationExplainer(classifier.model, classifier.tokenizer)
|
|
|
171 |
response_expl = model_expl(sequence, label_clean, hypothesis_template="This example is {}.")
|
172 |
|
173 |
-
print("
|
174 |
if len(predicted_labels) == 1:
|
175 |
response_expl = response_expl[model_expl.predicted_label]
|
176 |
|
|
|
168 |
puncts = list(string.punctuation)
|
169 |
|
170 |
model_expl = ZeroShotClassificationExplainer(classifier.model, classifier.tokenizer)
|
171 |
+
print("Here***")
|
172 |
response_expl = model_expl(sequence, label_clean, hypothesis_template="This example is {}.")
|
173 |
|
174 |
+
print("***Length of predicted_label", len(model_expl.predicted_label))
|
175 |
if len(predicted_labels) == 1:
|
176 |
response_expl = response_expl[model_expl.predicted_label]
|
177 |
|