Spaces:
Runtime error
Runtime error
Commit
·
9b135ca
1
Parent(s):
563eda1
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
|
|
|
|
3 |
classifier = pipeline("zero-shot-classification",
|
4 |
-
model="joeddav/xlm-roberta-large-xnli",use_auth_token=
|
5 |
|
6 |
def classify(text):
|
7 |
return classifier(text, candidate_labels, multi_label=True)
|
|
|
1 |
from transformers import pipeline
|
2 |
import gradio as gr
|
3 |
+
token = os.environ["token"]
|
4 |
+
|
5 |
classifier = pipeline("zero-shot-classification",
|
6 |
+
model="joeddav/xlm-roberta-large-xnli",use_auth_token=token)
|
7 |
|
8 |
def classify(text):
|
9 |
return classifier(text, candidate_labels, multi_label=True)
|