๐Ÿ“บ Streamlit: Example-Driven Learning (a presentation about streamlit with streamlit)

Hello everyone,
this week in our local Python Milan meetup we organized a streamlit night with two presentations about streamlit: Login to Meetup | Meetup

I made a presentation about Streamlit, using streamlit.

The presentation is called Streamlit: Example-driven learning. The presentation is targeted at streamlit beginners but the idea is to show interesting stuff also to experienced streamliters. The idea is to show first examples on what you can do with streamlit and use that as motivation to learn how to implement those with streamlit. The funny part is that also the presentation slides are done in streamlit and the whole presentation is a streamlit app. This is thanks to the great streamlit-reveal-slides component by @bouzidanas ! (see announcement in the forum). (and also thanks to reveal.js of course, which is a great tool).

Just to wheat the appetite and encourage you to watch the video (I would advise to watch the video first and later the app/slides), here is what I cover:

  • I start with a short demo where I build a minimal information retrieval system :female_detective: to search into a corpus of Italian literature (well, it is just two documents for now). The goal here is to showcase the particularly pleasant and fun worflow using streamlit (:heart: Auto Rerun). As added bonus I plant the idea of using streamlit as a library discovery tool (when did we get st.help in st.write? I did not remember it and it was a great surprise when preparing the presentation).
  • I then move on to the presentation, introduce what we plan to go over (we will build 4 apps and progressively learn streamlit concepts). I go over the three basic concepts I explain.
  • next app is a small example with two pages (the old way, with radio buttons) of data science :scientist: use cases: an example taken directly from sklearn about color quantization :framed_picture: and a very minimal example of data exploration :bar_chart:. This helps me introduce more concepts/widgets.
  • third app is about a chatbot :robot:, a rather old one, ELIZA. I think it is a nice piece of computing history and especially relevant these days ;). Rather easy to set up thanks to this eliza implementation in Python. I use this to introduce more advanced streamlit concepts, such as session state and url parameters (do you know that thing where you can share a recent chat of yours with chatgpt? wellโ€ฆ)
  • my fourth and final app is the slides themselves! :balloon:This is used to introduce the concept of components and how to do multipage apps.

I would be very much interested to hear what you think about it, I plan to iterate and improve and present again. I also had limited time to prepare this (I do already have a short list of things I want to improve).

Btw, I have been using streamlit at work since practically the beginning but this is the first time I share something substantial written in it, so I want to take the opportunity to thank the streamlit community! Streamlit is definitely great fun and there are a lot of people sharing great things with it, keep them coming!

Best,
Pietro

PS: and kudos to the dev advocacy teams which always keeps us entertained and engaged. I came here to share and well, we get yet another fun challenge!
PS2: I will let @fabiogra tell himself about his part in making that night an awesome streamlit night.

5 Likes

This is fantastic @pietroppeter!

Iโ€™ve added your presentation as well to the Streamlit Youtube Community Channel. :raised_hands:

If you present at an event in the future, let us know here: Attending an event or speaking about Streamlit? and we can prepare you with swag!

3 Likes

Ah thanks! Good to know I will keep it in mind for next time!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.