# Text Classifier using Gemini

**URL:** <https://discuss.huggingface.co/t/text-classifier-using-gemini/66525>\
**Category:** Show and Tell\
**Created:** [December 20, 2023, 9:04pm UTC](https://discuss.huggingface.co/t/text-classifier-using-gemini/66525 "2023-12-20T21:04:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fbadine](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/fbadine/32/22316_2.png) [@fbadine](https://discuss.huggingface.co/u/fbadine)\
**Post date:** [December 20, 2023, 9:04pm UTC](https://discuss.huggingface.co/t/text-classifier-using-gemini/66525/1 "2023-12-20T21:04:04Z")

</div>

Hi everyone,

I just created a simple text classifier using Gemini Pro so thought about sharing.

> **[Text Classifier - a Hugging Face Space by fbadine](https://huggingface.co/spaces/fbadine/text-classifier)**
>
> Discover amazing ML apps made by the community

Cheers,  
Fadi Badine

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [December 20, 2023, 9:07pm UTC](https://discuss.huggingface.co/t/text-classifier-using-gemini/66525/2 "2023-12-20T21:07:59Z")

</div>

Very cool @fbadine , thanks for sharing.

I’d recommend disabling the Gradio API, so other folks don’t abuse your private google token.

```auto
demo.queue(api_open=False)
demo.launch(debug=True, share=True, show_api=False)

```

---

<div class="post-metadata">

**Author:** ![fbadine](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/fbadine/32/22316_2.png) [@fbadine](https://discuss.huggingface.co/u/fbadine)\
**Post date:** [December 20, 2023, 9:33pm UTC](https://discuss.huggingface.co/t/text-classifier-using-gemini/66525/3 "2023-12-20T21:33:57Z")

</div>

Thanks @radames!!

I applied the changes that you suggested.  
What do those changes do in fact and how could my private google token gets abused without those please?

---

<div class="post-metadata">

**Author:** ![radames](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/radames/32/28246_2.png) [@radames](https://discuss.huggingface.co/u/radames)\
**Post date:** [December 20, 2023, 9:40pm UTC](https://discuss.huggingface.co/t/text-classifier-using-gemini/66525/4 "2023-12-20T21:40:07Z")

</div>

hi @fbadine ,

Your token is protect via Space secrets. Gradio Apps enables your app to be accessed via [API](https://www.gradio.app/guides/sharing-your-app#api-page), these two settings disabled it externall access via POST requests.

---

<div class="post-metadata">

**Author:** ![QK11](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/qk11/32/24270_2.png) [@QK11](https://discuss.huggingface.co/u/QK11)\
**Post date:** [February 28, 2024, 5:54am UTC](https://discuss.huggingface.co/t/text-classifier-using-gemini/66525/5 "2024-02-28T05:54:31Z")

</div>

Hello, sir; I have noticed you have used `<div>` tags. I want to understand why you have chosen `<div>` instead of a standard new line or line break.
