Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
56f6b38
1
Parent(s):
e83c60c
Trying zero-shot classification.
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def zero_shot_classification(data_string):
|
|
7 |
print(data_string)
|
8 |
data = json.loads(data_string)
|
9 |
print(data)
|
10 |
-
classifier = pipeline(task='zero-shot-classification', tokenizer=AutoTokenizer.from_pretrained('
|
11 |
|
12 |
results = classifier(data.sequence, candidate_labels=data.candidate_labels) #, hypothesis_template=data.hypothesis_template, multi_label=data.multi_label)
|
13 |
return {results}
|
|
|
7 |
print(data_string)
|
8 |
data = json.loads(data_string)
|
9 |
print(data)
|
10 |
+
classifier = pipeline(task='zero-shot-classification', tokenizer=AutoTokenizer.from_pretrained('sileod/deberta-v3-base-tasksource-nli'), model='sileod/deberta-v3-base-tasksource-nli')
|
11 |
|
12 |
results = classifier(data.sequence, candidate_labels=data.candidate_labels) #, hypothesis_template=data.hypothesis_template, multi_label=data.multi_label)
|
13 |
return {results}
|