Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,10 +8,10 @@ import gradio as gr
|
|
8 |
model_name = "MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
10 |
|
11 |
-
def clasificador(input)
|
12 |
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/mDeBERTa-v3-base-mnli-xnli",tokenizer=tokenizer)
|
13 |
sequence_to_classify = input
|
14 |
-
candidate_labels = ["
|
15 |
output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
|
16 |
return output
|
17 |
|
|
|
8 |
model_name = "MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7"
|
9 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
10 |
|
11 |
+
def clasificador(input):
|
12 |
classifier = pipeline("zero-shot-classification", model="MoritzLaurer/mDeBERTa-v3-base-mnli-xnli",tokenizer=tokenizer)
|
13 |
sequence_to_classify = input
|
14 |
+
candidate_labels = ["Nueva York","Barcelona","Buenos Aires","Córdoba","Roma","Londres","Sidney"]
|
15 |
output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
|
16 |
return output
|
17 |
|