Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
9704577
1
Parent(s):
6461529
Trying zero-shot classification.
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def zero_shot_classification(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(
|
13 |
return {results}
|
14 |
|
15 |
gradio_interface = gradio.Interface(
|
|
|
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}
|
14 |
|
15 |
gradio_interface = gradio.Interface(
|