# Best way to use TextStreamer in gradio

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-way-to-use-textstreamer-in-gradio%2F36767%3E%5C
**Category:** 🔒 Gradio\
**Created:** [April 16, 2023, 7:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-way-to-use-textstreamer-in-gradio%2F36767 "2023-04-16T19:28:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaziyarPanahi](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maziyarpanahi/32/23330_2.png) [@MaziyarPanahi](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMaziyarPanahi)%5C
**Post date:** [April 16, 2023, 7:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-way-to-use-textstreamer-in-gradio%2F36767%2F1 "2023-04-16T19:28:43Z")

</div>

Hi,

I know [TextStreamer](https://huggingface.co/docs/transformers/internal/generation_utils#transformers.TextStreamer) has not yet been released, but I was wondering how best one can use it inside a Gradio app.

---

<div class="post-metadata">

**Author:** ![MaziyarPanahi](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/maziyarpanahi/32/23330_2.png) [@MaziyarPanahi](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FMaziyarPanahi)%5C
**Post date:** [April 17, 2023, 2:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fbest-way-to-use-textstreamer-in-gradio%2F36767%2F2 "2023-04-17T14:35:56Z")

</div>

We have now an example for a new iterator of TextStreamer 🙂

> **[app.py · joaogante/transformers\_streaming at main](https://huggingface.co/spaces/joaogante/transformers_streaming/blob/main/app.py)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.
