Show & Tell: Dash Transformers apps (auto summarization, translator and chatbot) are now runnable on Colab

Hello all,

I wanted to share a collection of open-source Dash apps that I’ve been working on in the past few weeks. What they have in common is that they all use Huggingface’s Transformers library (DistilBART, MarianNMT and DialoGPT), and they all run much better on GPU than CPU.

Making Dash apps accessible has been extremely important to us, and the need for GPUs made it harder for everyone to try and modify those apps locally. Fortunately, with the release of JupyterDash v0.3, we can now run JupyterDash apps directly on Colab. For this occasion, we recreated our transformers apps as Colab notebooks (GPU-enabled), so you can get it running on the cloud in less than a minute. Here are links + short summaries of what each of them are doing:

  • Dash Automatic Summarization (Github CodeColab Demo): Summarizes large bodies of text (e.g. an article) into a single sentence using DistilBART.
  • Dash Chatbot (Github CodeColab Demo): Lets you talk with a chatbot (powered by DialoGPT) in a messaging interface.
  • Dash Neural Machine Translation (Github CodeColab Demo): Translate documents from English into any romance language (French, Spanish, German, Italian, etc.)

For more details, see below:

Dash Chatbot

Open In Colab

This app lets you chat with DialoGPT, a chatbot based on GPT that was trained on 147M comments+replies from Reddit. The model was developed by Microsoft Research, and it is hosted on Huggingface’s model repository.

chatbot

Dash Automatic Summarization

Open In Colab

This app lets you use DistilBART for automatically summarizing a piece of text.

summarization

Dash Neural Machine Translation

Open In Colab

This app written in less than 150 lines of Python lets you build a full fledge application for translating english text into romance languages, using Huggingface’s version of Marian. This app can be easily modified to incorporate other languages, other models, and even other frameworks (such as fairseq).

translation

Conclusion

Happy to hear your thoughts on each of the apps, and excited to see how you will modify those apps to make something unique for yourself.

6 Likes

This is superb. I think this is such a good highlight of what makes Dash so powerful – the ability to interact in real time with complex models.

2 Likes

Hello, this is some great work! I have incorporated some of the ideas from it into my own work and found it to be very helpful. However, I have noticed that the y-scrollbar does not automatically move to the bottom when new dialog items are generated, which can make using the application somewhat annoying. I was wondering if there is a way to fix this in Dash, or if it requires some JavaScript coding. Any help or advice on this matter would be greatly appreciated. Thank you