Commit
·
1be780a
1
Parent(s):
80aea0d
upadting labels striping
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ classifier = pipeline("zero-shot-classification",
|
|
11 |
#define a function to process your input and output
|
12 |
def zero_shot(doc, candidates):
|
13 |
given_labels = candidates.split(",")
|
14 |
-
given_labels = list(map(strip,given_labels))
|
15 |
dictionary = classifier(doc, given_labels)
|
16 |
labels = dictionary['labels']
|
17 |
scores = dictionary['scores']
|
|
|
11 |
#define a function to process your input and output
|
12 |
def zero_shot(doc, candidates):
|
13 |
given_labels = candidates.split(",")
|
14 |
+
given_labels = list(map(str.strip, given_labels))
|
15 |
dictionary = classifier(doc, given_labels)
|
16 |
labels = dictionary['labels']
|
17 |
scores = dictionary['scores']
|