# Multiple text classification using hugging face with gradio app

**URL:** <https://discuss.huggingface.co/t/multiple-text-classification-using-hugging-face-with-gradio-app/22135>\
**Category:** 🔒 Gradio\
**Created:** [August 26, 2022, 7:11am UTC](https://discuss.huggingface.co/t/multiple-text-classification-using-hugging-face-with-gradio-app/22135 "2022-08-26T07:11:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imran1](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/imran1/32/18779_2.png) [@Imran1](https://discuss.huggingface.co/u/Imran1)\
**Post date:** [August 26, 2022, 7:11am UTC](https://discuss.huggingface.co/t/multiple-text-classification-using-hugging-face-with-gradio-app/22135/1 "2022-08-26T07:11:54Z")

</div>

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.

```auto
def text(txt):
    x = pipeline (txt)
    return x

```

```auto
text("the macdonald food is not good")

```

```auto
gr.Interface(fn=predict,inputs="text",outputs=gr.Label.output(5)).launch()

```

---

<div class="post-metadata">

**Author:** ![abidlabs](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/abidlabs/32/21878_2.png) [@abidlabs](https://discuss.huggingface.co/u/abidlabs)\
**Post date:** [September 14, 2022, 10:54pm UTC](https://discuss.huggingface.co/t/multiple-text-classification-using-hugging-face-with-gradio-app/22135/2 "2022-09-14T22:54:41Z")

</div>

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

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

```
