Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,15 +11,15 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
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 |
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn=clasificador,
|
21 |
-
inputs=gr.inputs.Textbox(label="
|
22 |
-
outputs=gr.outputs.Textbox(label="Clasificaci贸n
|
23 |
)
|
24 |
|
25 |
iface.launch()
|
|
|
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 = ["consumidor","ventas","ganancias","cliente","prestamo","dinero"]
|
15 |
output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
|
16 |
return output
|
17 |
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn=clasificador,
|
21 |
+
inputs=gr.inputs.Textbox(label="Ingrese texto"),
|
22 |
+
outputs=gr.outputs.Textbox(label="Clasificaci贸n")
|
23 |
)
|
24 |
|
25 |
iface.launch()
|