Multiple text classification using hugging face with gradio app

Hi, I want to classify multi class text classification. But Iā€™m confuse, how to classify them with 5 different categories like we classify image.

def text(txt):
    x = pipeline (txt)
    return x
text("the macdonald food is not good")
gr.Interface(fn=predict,inputs="text",outputs=gr.Label.output(5)).launch()

Hi @Imran1, what format is x here? If it is a dictionary of labels and probabilities, then the following code should work:

gr.Interface(fn=predict,inputs="text",outputs="label").launch()