from transformers import pipeline import gradio as gr classifier = pipeline("zero-shot-classification", model="joeddav/xlm-roberta-large-xnli",use_auth_token=True) def classify(text): return classifier(text, candidate_labels, multi_label=True) candidate_labels = ["wasser", "strom", "gas", "hausreinigung", "schoenheit", "wellness", "oeffentlichkeit", "oeffentlicher", "verkehr", "vermietung", "medizin", "gesundheit", "pflege", "reisen", "tourismus", "versicherungen", "recht"] gr.Interface(classify, "textbox", "label", live=True, capture_session=True).launch()