ACERCA DE ESTE EPISODIO
Building well designed and easy to use web applications requires a significant amount of knowledge and experience across a range of domains. This can act as an impediment to engineers who primarily work in so-called back-end technologies such as machine learning and systems administration. In this episode Adrien Treuille describes how the Streamlit framework empowers anyone who is comfortable writing Python scripts to create beautiful applications to share their work and make it accessible to their colleagues and customers. If you have ever struggled with hacking together a simple web application to make a useful script self-service then give this episode a listen and then go experiment with how Streamlit can level up your work.
Announcements- Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
- When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With 200 Gbit/s private networking, scalable shared block storage, node balancers, and a 40 Gbit/s public network, all controlled by a brand new API you’ve got everything you need to scale up. And for your tasks that need fast computation, such as training machine learning models, they just launched dedicated CPU instances. Go to pythonpodcast.com/linode to get a $20 credit and launch a new server in under a minute. And don’t forget to thank them for their continued support of this show!
- Having all of your logs and event data in one place makes your life easier when something breaks, unless that something is your Elastic Search cluster because it’s storing too much data. CHAOSSEARCH frees you from having to worry about data retention, unexpected failures, and expanding operating costs. They give you a fully managed service to search and analyze all of your logs in S3, entirely under your control, all for half the cost of running your own Elastic Search cluster or using a hosted platform. Try it out for yourself at pythonpodcast.com/chaossearch and don’t forget to thank them for supporting the show!
- You listen to this show to learn and stay up to date with the ways that Python is being used, including the latest in machine learning and data analysis. For even more opportunities to meet, listen, and learn from your peers you don’t want to miss out on this year’s conference season. We have partnered with organizations such as O’Reilly Media, Dataversity, Corinium Global Intelligence, Alluxio, and Data Council. Upcoming events include the combined events of the Data Architecture Summit and Graphorum, the Data Orchestration Summit, and Data Council in NYC. Go to pythonpodcast.com/conferences to learn more about these and other events, and take advantage of our partner discounts to save money when you register today.
- Your host as usual is Tobias Macey and today I’m interviewing Adrien Treuille about Streamlit, an open source app framework built for machine learning and data science teams
- Introductions
- How did you get introduced to Python?
- Can you start by explaining what Streamlit is and its origin story?
- What are some of the types of applications that are commonly built by data teams and who are the typical consumers of those projects?
- What are some of the challenges or complications that are unique to this problem space?
- What are some of the complications or challenges that you have faced to integrate Streamlit with so many different machine learning frameworks?
- Can you describe the technical implementation of Streamlit and how it has evolved since you began working on it?
- How did you approach the design of the API and development workflow to tailor it for the needs and capabilities of machine learning engineers?
- If you were to start the project from scratch today what would you do differently?
- What is a typical workflow for someone working on a machine learning application and how does Streamlit fit in?
- What are some of the types of tools or processes that it replaces?
- What are some of the most interesting or unexpected ways that you have seen Streamlit used?
- What have you found to be some of the most challenging or unexpected aspects of building and evolving Streamlit?
- How do you see Python evolving in light of Streamlit and other work in the machine learning space?
- What do you have in store for the future of Streamlit or any adjacent products and services?
- How are you approaching the governance and sustainability of the Streamlit open source project?
- Tobias
- The Book Of Why by Judea Pearl
- Adrien
- No Self, No Problem by Anam Thubten
- Thank you for listening! Don’t forget to check out our other show, the Data Engineering Podcast for the latest on modern data management.
- Visit the site to subscribe to the show, sign up for the mailing list, and read the show notes.
- If you’ve learned something or tried out a project from the show then tell us about it! Email hosts@podcastinit.com) with your story.
- To help other people find the show please leave a review on iTunes and tell your friends and co-workers
- Join the community in the new Zulip chat workspace at pythonpodcast.com/chat
- Streamlit
- Carnegie Mellon University
- Google X
- Zoox
- IBM
- Cornell University
- NumPy
- SciPy
- Machine Learning Engineer
- Jupyter
- DeckGL
- Matplotlib
- Plotly
- Seaborn
- Altair
- PyTorch
- Tensorflow
- Protocol Buffers
- Streamlit for teams
- Heroku
- EC2
- React JS
- Awesome Streamlit
- Flask
- Plotly Dash
- Voila
- NeurIPS
The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA
MOSTRAR NOTAS 🔗
TRANSCRIPCIÓN 🔗
NOTE
Transcription provided by Podhome.fm
Created: 7/6/2024 4:13:32 PM
Duration: 2941.436
Channels: 1
1
00:00:11.905 --> 00:00:16.645
Hello, and welcome to podcast dot in it, the podcast about Python and the people who make it great.
2
00:00:17.260 --> 00:00:24.320
When you're ready to launch your next app or want to try a project you hear about on the show, you'll need somewhere to deploy it. So take a look at our friends over at Linode.
3
00:00:25.085 --> 00:00:35.960
With 200 gigabit private networking, scalable shared block storage, node balancers, and a 40 gigabit public network, all controlled by a brand new API, you've got everything you need to scale up.
4
00:00:36.580 --> 00:00:42.805
And for your tasks that need fast computations, such as training machine learning models, they just launched dedicated CPU instances.
5
00:00:43.585 --> 00:00:48.165
And they also have a new object storage service to make storing data for your apps even easier.
6
00:00:48.780 --> 00:00:50.000
Go to python podcast.com/linode,
7
00:00:51.500 --> 00:01:00.715
that's l I n o d e, today to get a $20 credit and launch a new server in under a minute. And don't forget to thank them for their continued support of this show.
8
00:01:01.415 --> 00:01:10.150
Having all of your logs and event data in 1 place makes your life easier when something breaks, unless that something is your Elasticsearch cluster because it's storing too much data.
9
00:01:11.170 --> 00:01:14.070
ChaosSearch frees you from having to worry about data retention,
10
00:01:14.534 --> 00:01:17.195
unexpected failures, and expanding operating costs.
11
00:01:17.895 --> 00:01:24.280
They give you a fully managed service to search and analyze all of your logs from s 3 entirely under your control, all
12
00:01:26.200 --> 00:01:28.540
all for half the cost of running your own Elasticsearch cluster or using a hosted platform.
13
00:01:29.400 --> 00:01:31.180
Try it out for yourself at pythonpodcast.com/chaossearch,
14
00:01:33.665 --> 00:01:36.005
and don't forget to thank them for supporting the show.
15
00:01:36.865 --> 00:01:43.869
And you listen to this show to learn and stay up to date with the ways that Python is being used, including the latest in machine learning and data analysis.
16
00:01:44.890 --> 00:01:50.509
For even more opportunities to meet, listen, and learn from your peers, you don't want to miss out on this year's conference season.
17
00:01:51.195 --> 00:01:57.375
We have partnered with organizations such as O'Reilly Media, Corinium Global Intelligence, Alexio, and Data Council.
18
00:01:58.240 --> 00:02:02.660
Upcoming events include the data orchestration summit and Data Council in New York City.
19
00:02:03.280 --> 00:02:04.180
Go to pythonpodcast.com/conferences
20
00:02:06.225 --> 00:02:11.765
to learn more about these and other events, and take advantage of our partner discounts to save money when you register today.
21
00:02:12.225 --> 00:02:22.960
Your host as usual is Tobias Macy. And today, I'm interviewing Adrian Troy about Streamlit, an open source app framework built for machine learning and data science teams. And so, Adrian, can you start by introducing yourself?
22
00:02:23.425 --> 00:02:36.490
Hi. Yeah. So I'm Adrian. I started Streamlit about a year ago with, some friends of mine, and we launched it 5 weeks ago. It's been really exciting. And before that, I was a professor at Carnegie Mellon University.
23
00:02:37.030 --> 00:02:47.115
I ran a pretty big AI project at Google X, and I was vice president of simulation at Zoox, which is a unicorn, a self driving car startup.
24
00:02:47.630 --> 00:02:49.890
And do you remember how you first got introduced to Python?
25
00:02:50.350 --> 00:02:58.114
Yes. I do. I remember very clearly. So the very first time I heard of Python, I was in my 1st year of computer science grad
26
00:02:58.575 --> 00:02:59.875
school. It was 2001,
27
00:03:00.894 --> 00:03:12.140
and I was you know, I thought Java was so cool because it was, like, garbage collected and stuff, and it was so much better than c plus plus Anyway, and I'm in this class, and someone mentioned this language called Python,
28
00:03:12.840 --> 00:03:22.970
and none of us had heard of it. And, and someone said, what's Python? And I remember this grad student said, really derisively, he was like, oh, it's this weird language where white space is important.
29
00:03:24.550 --> 00:03:24.870
And,
30
00:03:25.590 --> 00:03:31.785
we you know, I he was he'd obviously thought that was, like, the really just the stupidest idea in the world,
31
00:03:33.305 --> 00:03:39.325
and, I guess I sort of agreed with him for no reason. But then, some next summer, I went to IBM
32
00:03:39.700 --> 00:03:40.280
in Cambridge,
33
00:03:40.819 --> 00:03:44.280
and a friend of mine who was super smart, this amazing Cornell
34
00:03:44.739 --> 00:03:45.239
undergrad,
35
00:03:45.860 --> 00:03:52.395
said, oh, you should check out this Python thing. You know, I'm doing all my work in it. And so I started playing with it, and I fell in love. And,
36
00:03:53.175 --> 00:03:54.910
Python really is the language
37
00:03:57.976 --> 00:03:58.850
so, I feel like I've been there, not from the start, but from early days, and that
38
00:04:04.975 --> 00:04:05.475
NumPy,
39
00:04:05.855 --> 00:04:06.355
SciPy,
40
00:04:07.135 --> 00:04:10.435
all those things, I I learned about them and loved them along the way.
41
00:04:11.215 --> 00:04:14.435
And at this point now, you have decided to
42
00:04:15.040 --> 00:04:28.115
start a business and a project based on Python using it for your core product. And so I'm wondering if you can talk a bit about what the Streamlit product is and some of the origin story and your inspiration for creating it. Yeah. So,
43
00:04:28.515 --> 00:04:31.015
what Streamlit is is an app framework,
44
00:04:31.910 --> 00:04:34.810
really for the whole Python language. But we started,
45
00:04:35.509 --> 00:04:43.815
with ML engineers and data scientists, and that's because that's really what our background was. And we had a lot of experience in this numerical computing. And,
46
00:04:44.575 --> 00:04:45.075
we
47
00:04:45.495 --> 00:04:51.400
1 of the things that I noticed, basically, at Carnegie Mellon, at Zukes, and at Google is that,
48
00:04:52.280 --> 00:04:52.780
actually,
49
00:04:53.400 --> 00:04:57.100
if you're in a Python dev team, you spend a lot of time building
50
00:04:57.479 --> 00:05:03.475
web tools. So like, in the self driving car project, we had internal web tools to
51
00:05:04.175 --> 00:05:17.365
search the entire image data set, a huge number of images. We would, like, run models in real time on the images. We would run simulations. We'd run comparisons between multiple simulations, and we'd had a scenario search engine, and so
52
00:05:17.665 --> 00:05:22.885
these were really the tools that were kind of like the lifeblood of the project and they really kept
53
00:05:23.425 --> 00:05:25.205
everyone aligned together.
54
00:05:25.960 --> 00:05:37.865
And they also, you know, extended into the ops group, the people who were driving cars around and needed to know what their schedules were, and to the executives. And the observation was it was, really, really difficult to build these tools,
55
00:05:38.245 --> 00:05:52.566
and either they were super ad hoc and, you know, they were like Jupyter Notebooks and so they weren't really usable by the group, or if they became important, we would, call in the tools team, which were a group of engineers who were,
56
00:05:53.164 --> 00:06:02.830
really had a specialty in React and Vue and server architecture and stuff, and they would sort of bless a tool and then make it this really beautiful polished thing, which was actually amazing,
57
00:06:03.449 --> 00:06:13.574
but it they, you know, then they'd say, well, we have to now we have to we'll get back to you in 2 months because now we're working on the next tool, And so the ML engineers were really sort of, in many ways, disintermediated
58
00:06:14.435 --> 00:06:15.735
from the rest of the company
59
00:06:16.195 --> 00:06:17.710
by this by this barrier.
60
00:06:18.090 --> 00:06:18.590
So,
61
00:06:19.690 --> 00:06:26.535
so so that was really a lot of the, original thinking behind Streamlit, and I think once we released it,
62
00:06:26.935 --> 00:06:28.635
I guess 5 weeks ago now,
63
00:06:29.095 --> 00:06:29.995
it was really
64
00:06:30.295 --> 00:06:31.995
sort of encouraging to see
65
00:06:32.375 --> 00:06:33.755
basically the community
66
00:06:34.510 --> 00:06:36.610
immediately responding and saying, yes,
67
00:06:37.310 --> 00:06:43.250
this is super real and this is it's awesome that this exists now and and, so that's been very validating.
68
00:06:44.095 --> 00:06:51.155
And I like what you were saying too about the fact that these applications were valuable to people outside of the data team, specifically,
69
00:06:58.280 --> 00:07:01.875
more broadly, in software engineering where the more broadly in software engineering, where
70
00:07:02.415 --> 00:07:03.315
the capabilities
71
00:07:04.095 --> 00:07:06.915
of what we can build with software is valuable
72
00:07:07.530 --> 00:07:15.790
to virtually everyone. But because of the high barrier to entry that we've created with needing to know so many different levels of the stack to build something effective,
73
00:07:16.485 --> 00:07:26.530
it prevents a lot of people from even exploring that space and wanting to build their own tools. And so it's nice to see that streamlet is another entry to be able to provide that capability
74
00:07:27.070 --> 00:07:27.570
who
75
00:07:28.030 --> 00:07:31.650
has some facility with programming, but doesn't necessarily want to
76
00:07:32.014 --> 00:07:32.995
know and understand
77
00:07:33.375 --> 00:07:37.715
the entire space of building a beautifully designed web application.
78
00:07:38.655 --> 00:07:40.195
Yeah. I think that's exactly,
79
00:07:40.710 --> 00:07:43.610
that's exactly the spirit in which we design the software,
80
00:07:44.150 --> 00:07:54.585
you know, and it's really true that the, you know, the data scientists and ML engineers and it also applies to data engineers, and, you know, DevOps often have they're doing this
81
00:07:55.205 --> 00:08:00.760
hard and amazing work, and yet because of the way these different tech stacks are built, they're sort of disintermediated
82
00:08:01.620 --> 00:08:02.600
from their customers.
83
00:08:02.980 --> 00:08:03.720
And so,
84
00:08:04.420 --> 00:08:05.560
Streamlit is,
85
00:08:06.385 --> 00:08:09.445
it's very simple in some ways, but it's kind of like a little superpower
86
00:08:10.065 --> 00:08:12.085
that turns any Python program
87
00:08:12.705 --> 00:08:20.000
into an interactive app that then can you know, really project the programmer's power throughout the organization. And and we're seeing a lot of uses,
88
00:08:20.380 --> 00:08:23.360
outside of just the ML group as well, so that's really exciting.
89
00:08:23.905 --> 00:08:38.660
So for somebody who is building an app with Streamlit, what are some of the types of widgets that you support and the types of applications that you've seen built commonly by data teams and some of the typical consumers of those applications?
90
00:08:39.360 --> 00:08:39.839
So,
91
00:08:40.240 --> 00:08:43.045
well, first of all, I have to give a shout out to Jupyter
92
00:08:43.825 --> 00:08:47.765
because they really, like, led the way for, having this amazing
93
00:08:48.145 --> 00:08:54.690
widget support in in the Python community, really. And so now a lot of great JavaScript libraries like,
94
00:08:55.250 --> 00:08:55.750
deckgl,
95
00:08:56.610 --> 00:08:57.910
which is, Uber's
96
00:08:58.885 --> 00:09:00.185
amazing geographic,
97
00:09:00.645 --> 00:09:01.145
visualization
98
00:09:01.685 --> 00:09:02.185
library,
99
00:09:02.565 --> 00:09:06.985
has Python bindings, and the the reason is because of Jupyter, basically. And
100
00:09:07.440 --> 00:09:07.940
Streamlit's,
101
00:09:08.320 --> 00:09:19.465
we it's a it's a different use case from Jupyter. We we actually use both side by side. So, Jupyter is really for interactive exploration and and disseminating ideas. I mean, it has many use cases actually.
102
00:09:19.925 --> 00:09:21.385
Streamlit's really for app building.
103
00:09:22.380 --> 00:09:26.240
But it turns out that we were really rapidly able to assimilate
104
00:09:26.940 --> 00:09:32.055
almost all of the major visualization libraries into Streamlit. So, you know, .gl, matplotlib,
105
00:09:32.915 --> 00:09:34.135
plotly, seaborne.
106
00:09:34.835 --> 00:09:40.855
Let's see. I'm missing a whole bunch here. Altair, which is an amazing library. And then we have a bunch of
107
00:09:41.280 --> 00:09:47.940
the basically the standard widgets, so, you know, various kinds of inputs, sliders, text input, dates input, those kinds of things.
108
00:09:48.355 --> 00:09:53.015
And, and those are sort of the the basic, you know, atoms in the periodic table of
109
00:09:53.395 --> 00:09:53.895
Streamlit.
110
00:09:54.355 --> 00:09:56.110
And then the real innovation
111
00:09:56.490 --> 00:10:01.389
is in the ability to mix and match those, you know, sort of almost instantly
112
00:10:01.850 --> 00:10:02.350
without
113
00:10:02.805 --> 00:10:03.305
having
114
00:10:03.765 --> 00:10:05.945
to define a complex declarative
115
00:10:06.485 --> 00:10:08.185
web layout with divs
116
00:10:08.965 --> 00:10:16.945
and spans and all these HTML and CSS things. Just really write it as an ordinary Python script. So in that sense, so, you know, that
117
00:10:17.425 --> 00:10:22.965
allowed us to see a whole bunch of applications. I'm happy to share with you some of the some of the ones that we've seen if you're interested.
118
00:10:23.585 --> 00:10:28.130
Yeah. We can dig a bit more into some of the interesting examples later. In the meantime,
119
00:10:28.510 --> 00:10:29.330
I'd be interested
120
00:10:30.110 --> 00:10:33.410
to dig into some of the challenges and complications
121
00:10:33.710 --> 00:10:38.134
that you have run into that you feel are unique to this problem space of
122
00:10:38.514 --> 00:10:45.000
building an easy to use application framework for people who don't necessarily have a lot of front end experience
123
00:10:45.460 --> 00:10:48.600
or the time and inclination to dig deep into that area?
124
00:10:49.300 --> 00:10:54.315
That, to me, is kind of the central challenge of all of Streamlit, and it's really
125
00:10:54.774 --> 00:11:05.130
the animating question that drove us to build it. And I think that the key thing is, how could we make building web tools as easy as writing Python scripts? And
126
00:11:05.670 --> 00:11:14.315
the basic idea here is that in in a very logical sense, a web tool or a, you know, web an app on a phone, it's usually described
127
00:11:15.495 --> 00:11:16.235
as this
128
00:11:16.770 --> 00:11:19.589
declarative set of widgets, which are then wired together
129
00:11:19.970 --> 00:11:33.235
sort of reactively in order to create sort of a UI experience of some kind. And Streamlit, our starting point is actually a Python script, so something that executes from top to bottom. And what we wanted to do was let you weave
130
00:11:33.640 --> 00:11:36.220
GUI code into that logic without actually
131
00:11:36.600 --> 00:11:38.940
subverting or inverting that logic at all,
132
00:11:39.480 --> 00:11:42.005
and then and come out with an app
133
00:11:42.485 --> 00:11:43.465
that you can use.
134
00:11:45.045 --> 00:11:45.945
And I think
135
00:11:47.605 --> 00:11:52.880
it's perhaps a slightly subversive thing to do, but I think it's a very, very Pythonic thing to do, actually, and
136
00:11:53.260 --> 00:12:06.910
we always strove to make there to be easy and 1 way to do things, or whatever that Python code is. And the response has been really, like, extraordinary. I mean, tens of thousands of apps have been created, in our 5 week lifespan,
137
00:12:07.610 --> 00:12:13.870
and 1 of the really amazing things has just been to see dozens of tweets coming out per day of people saying
138
00:12:14.195 --> 00:12:21.415
look at this app I made in 50 lines of code or 70 lines of code or I just turned my Python script into an app that's deployed on Heroku
139
00:12:21.889 --> 00:12:22.709
you know, overnight.
140
00:12:23.089 --> 00:12:24.690
The streamlet hype is real. And,
141
00:12:25.410 --> 00:12:29.670
that's just been so cool and exciting, and it really actually
142
00:12:30.475 --> 00:12:30.975
completely
143
00:12:31.355 --> 00:12:32.574
exceeded our expectations
144
00:12:32.875 --> 00:12:39.615
by a large, large margin. So, yeah, I I feel like people resonated with this approach to
145
00:12:40.920 --> 00:12:43.339
looking at app development from the
146
00:12:43.720 --> 00:12:45.819
perch of a Python programmer.
147
00:12:46.120 --> 00:12:50.155
And the fact that you originally conceived this as targeting
148
00:12:50.935 --> 00:13:04.690
machine learning engineers and data scientists is exhibited by the fact that you have some strong integration with a number of different machine learning libraries. And I'm curious what you have seen as far as any challenges of being able to
149
00:13:05.065 --> 00:13:15.550
cleanly represent those bindings, given the fact that there are so many different libraries that you're working with that might have conflicting views of what a typical workflow might be or
150
00:13:15.930 --> 00:13:18.670
what the necessary bindings are for being able to
151
00:13:19.050 --> 00:13:20.190
wire it up to,
152
00:13:20.650 --> 00:13:29.035
front end component, for instance? Yeah. That's a great question. So, indeed, we do have sort of our our first class citizens include a lot of the basic,
153
00:13:29.495 --> 00:13:38.060
things that you'll come across in machine learning and data science. So data frames, NumPy arrays. We do a lot of stuff with PyTorch, TensorFlow.
154
00:13:38.840 --> 00:13:42.584
And those were really our guiding examples as we were building stream La2, so we
155
00:13:42.885 --> 00:13:44.425
feel most comfortable
156
00:13:45.045 --> 00:13:47.144
endorsing its use in those use cases.
157
00:13:47.605 --> 00:13:57.240
And I think to your question of what was hard and easy, on the 1 hand, it was really easy, and on the other hand, there were some tricky things, and the the easiness just comes from
158
00:13:57.700 --> 00:14:02.175
starting with Python itself. I mean, you know, Python has become, like, par excellence,
159
00:14:02.954 --> 00:14:19.985
the the sort of glue language of of all of these different ideas. And so people come to us and they say, well, is Streamlit compatible with Spark? Is it compatible with TensorFlow? Is it and we're like, it's compatible with anything that Python's compatible because it's pure Python, and that's just an amazing superpower. I mean,
160
00:14:20.524 --> 00:14:31.100
other app frameworks that that we see coming out in the startup space, for example, are, you know, SaaS platforms. And then every single integration, they have to write themselves and and wrap in the language, and we just,
161
00:14:31.560 --> 00:14:32.300
we present
162
00:14:32.635 --> 00:14:33.375
pure unadulterated
163
00:14:33.755 --> 00:14:38.495
Python to our users and let them do whatever they want, which is just so exciting.
164
00:14:39.195 --> 00:14:44.610
So digging deeper into Streamlit itself, can you describe a bit about how it's implemented
165
00:14:44.910 --> 00:14:51.505
and some of the ways that it's evolved since you first began implementing and iterating on it? So, in terms of how
166
00:14:51.884 --> 00:14:53.024
Streamlit's implemented,
167
00:14:53.565 --> 00:14:54.464
the the basic
168
00:14:55.324 --> 00:14:58.384
idea is that instead of saying Python
169
00:14:59.290 --> 00:15:03.390
your Python file, you say streamlet run your Python file.
170
00:15:04.010 --> 00:15:04.510
And
171
00:15:05.290 --> 00:15:07.230
what that does is
172
00:15:07.765 --> 00:15:08.985
we take it,
173
00:15:09.525 --> 00:15:11.865
we take your Python file, we import
174
00:15:12.325 --> 00:15:15.145
all of the imported libraries, and
175
00:15:15.490 --> 00:15:20.870
and then we run it in what we call a ScriptRunner. And what this ScriptRunner does is
176
00:15:21.410 --> 00:15:24.150
connect first of all, it allows your script to connect
177
00:15:24.765 --> 00:15:27.745
live to a web browser via a WebSocket connection.
178
00:15:28.285 --> 00:15:31.745
So you can transfer information back and forth to the web browser
179
00:15:32.209 --> 00:15:32.949
just purely,
180
00:15:33.250 --> 00:15:44.404
using only Python calls and all of the details of this are completely hidden from the user. And the other thing that it allows us to do is rerun your script really efficiently
181
00:15:44.785 --> 00:15:53.689
in case anything changes on the web browser. So it gives you kind of like an interactive view into a static Python script, which is really the the Streamlit magic.
182
00:15:53.990 --> 00:16:04.185
And that was the core idea from the start. I mean, the Streamlit actually was a solo programming project and not a company, in the early days, and it was that was the core idea that we were working on.
183
00:16:04.725 --> 00:16:13.530
What happened was really early on, a a bunch of, engineers first from Uber and then, Stitch Fix and some other great companies started using it and gave us
184
00:16:13.990 --> 00:16:21.085
feedback. And so in a sense, since we, you know, we had real users, even though there were only 2 or 3 in the beginning,
185
00:16:21.545 --> 00:16:33.550
it, it was sort of a crowdsourced development process. We regularly met with them, and they showed us what they were doing, and they told us what they wanted. And, really, most of the best ideas in Streamlit
186
00:16:34.065 --> 00:16:36.645
came from our users. And so
187
00:16:37.265 --> 00:16:38.885
now that we've launched,
188
00:16:39.665 --> 00:16:42.965
it's it's actually just grown exponentially. So at this point,
189
00:16:43.519 --> 00:16:53.685
there are tens of thousands of people have used Streamlit, just in the first 5 weeks, and we you know, I think 1 of the things that's very much a concern for us and the company is how can we
190
00:16:54.305 --> 00:16:58.325
keep this cadence of listening to the community and keep this development
191
00:16:58.705 --> 00:16:59.205
approach,
192
00:16:59.589 --> 00:17:04.409
but, you know, scale it up so that people feel like their voices are being heard and so that multiple
193
00:17:04.950 --> 00:17:05.450
voices,
194
00:17:06.150 --> 00:17:09.465
can, and and information from multiple sources can be assimilated,
195
00:17:09.765 --> 00:17:15.865
scalably. So so it it was sort of crowdsourced from the start, and now we're struggling to to keep up with the community
196
00:17:16.245 --> 00:17:19.050
and and scale our processes. 1 of the challenges
197
00:17:19.590 --> 00:17:21.770
of building a tool like this is identifying
198
00:17:22.150 --> 00:17:26.490
what the user facing API should look like to make sure that it is
199
00:17:26.835 --> 00:17:39.740
approachable and usable, but at the same time, sufficiently expressive for people to be able to build the types of applications that they want to without having to dig too deep into the guts of it? Yeah. That's something that we've
200
00:17:40.280 --> 00:17:40.780
really,
201
00:17:41.400 --> 00:17:42.460
approached with,
202
00:17:43.080 --> 00:17:44.300
I guess I would say,
203
00:17:45.075 --> 00:17:48.055
a huge amount of care and actually a lot of work.
204
00:17:48.595 --> 00:17:52.135
We've literally used every competing app framework
205
00:17:52.880 --> 00:17:58.900
that we could find on the web, and we wrote detailed notes on how they all worked and what we liked and what we didn't like.
206
00:17:59.360 --> 00:18:05.465
And then we we worked really, really closely with the community on and the ordering of arguments to functions.
207
00:18:06.485 --> 00:18:07.925
And so I I think
208
00:18:08.590 --> 00:18:13.730
and also just making things work right the first time as you would expect, which is, of course,
209
00:18:14.030 --> 00:18:15.490
the hardest thing to do.
210
00:18:16.030 --> 00:18:17.410
It's really easy to
211
00:18:17.725 --> 00:18:26.020
say, oh, well, you know, that's user error. Or if they wanna have it work this other way, then we'll just add another 16 arguments to this function and let them, you know,
212
00:18:26.980 --> 00:18:32.440
configure everything. But the the cost of that is really in is is paid in the complexity
213
00:18:33.060 --> 00:18:34.520
of the API and,
214
00:18:35.025 --> 00:18:38.405
you know, that's that's not we we recognize that
215
00:18:38.785 --> 00:18:39.285
our
216
00:18:39.825 --> 00:18:40.325
users'
217
00:18:41.105 --> 00:18:42.645
brain cycles are
218
00:18:43.110 --> 00:18:44.490
really extremely valuable.
219
00:18:45.350 --> 00:18:45.850
And,
220
00:18:46.630 --> 00:18:59.355
and so we we we worked really hard and and and, for that matter, broke compatibility a few times along the way in order to to get the API right. And that's that's still an ongoing process. I think that that Streamlit is really in its MVP
221
00:18:59.735 --> 00:19:00.794
phase right now.
222
00:19:01.095 --> 00:19:01.595
And
223
00:19:02.190 --> 00:19:17.305
just having this flood of people come in and tell us this this didn't work or that didn't work has really sharpened our our picture of where we where Streamlit needs more attention and what parts were working, and and so, we're we're actually,
224
00:19:17.770 --> 00:19:23.850
you know, our road map over the next 6 to 8 months is is really, really clear and,
225
00:19:24.570 --> 00:19:33.645
of features that we'd like to to bring out and ways that we wanna empower the community to build, you know, richer, faster, more beautiful apps quickly. And, and I guess I would say
226
00:19:34.070 --> 00:19:40.970
to the community of users, first of all, thank you for for telling us what's broken and what's wrong. It's so valuable.
227
00:19:41.275 --> 00:19:50.015
And, also, please help us. We've started seeing pull requests trickle in and and users teaching 1 another tricks about Streamlit that we didn't even realize,
228
00:19:50.660 --> 00:19:55.720
and that's just been so cool. And we it's just so so so cool, and it's it's necessary,
229
00:19:56.660 --> 00:19:59.975
for for to keep the community growing. So so yeah.
230
00:20:00.355 --> 00:20:22.565
The choice of Python seems fairly natural given the initial community that you were targeting because of the fact that it's so widely used in the data space, both for data engineers and for data scientists. But from the perspective of the project itself and the way that you have engineered it, if you were to start it over today knowing what you do now, what is it that you think you would do differently
231
00:20:23.105 --> 00:20:29.250
either in terms the overall system design or in the early efforts of building and promoting it?
232
00:20:29.630 --> 00:20:30.850
Yeah. I think we,
233
00:20:31.394 --> 00:20:35.154
technically, Streamlit is language agnostic, actually,
234
00:20:35.475 --> 00:20:38.054
in the sense that the underlying data layer,
235
00:20:38.434 --> 00:20:41.760
that intercedes between the browser portion
236
00:20:42.700 --> 00:20:48.640
and the server portion is written in is actually written in Google protobuf, so it's sort of a language agnostic
237
00:20:49.645 --> 00:20:50.625
layer. That said,
238
00:20:51.005 --> 00:20:52.945
we, you know, we are Pythonistas.
239
00:20:53.725 --> 00:20:55.745
That's our background, and it was certainly
240
00:20:56.799 --> 00:20:57.299
informed
241
00:20:57.840 --> 00:21:02.340
by our, you know, our experiences as Python programmers. And so,
242
00:21:02.799 --> 00:21:09.835
we we actually the the notion of opening it up to other languages, I think, makes sense and is is very exciting. And I think the Dreamlet model
243
00:21:10.615 --> 00:21:15.434
totally works in other languages, but but we are really committed to Python right now.
244
00:21:15.850 --> 00:21:21.630
And also it's just it's just such a great language. It is really great to, you know,
245
00:21:22.010 --> 00:21:23.070
be able to
246
00:21:23.725 --> 00:21:25.184
write just a small
247
00:21:26.205 --> 00:21:29.184
library in some sense and then have it be
248
00:21:29.965 --> 00:21:33.910
super powered by the insane reach and sort of compatibility
249
00:21:34.610 --> 00:21:39.435
of Python based almost unmatched in the, in the language world. In terms of
250
00:21:39.915 --> 00:21:42.335
what we would have done differently,
251
00:21:43.275 --> 00:21:43.935
I think
252
00:21:45.355 --> 00:21:48.815
if if you look at early Streamlit, it looks
253
00:21:49.120 --> 00:21:51.460
totally different than it does now.
254
00:21:52.160 --> 00:21:56.660
So in a sense, I think we have taken the opportunity along the way
255
00:21:57.195 --> 00:22:01.515
of changing things when we were wrong, basically. And so from
256
00:22:02.075 --> 00:22:04.655
I'm actually sort of happy with where it is now,
257
00:22:05.000 --> 00:22:07.740
but it but that's because we we really
258
00:22:08.280 --> 00:22:08.780
rewrote
259
00:22:09.400 --> 00:22:11.420
it along the way a few times.
260
00:22:11.880 --> 00:22:13.100
And, and,
261
00:22:14.054 --> 00:22:18.554
you know, we we we rewrote even the APIs when we when we realized they were
262
00:22:18.855 --> 00:22:22.840
confusing and stuff, so we weren't afraid of that. Now, of course, now,
263
00:22:23.380 --> 00:22:24.919
the big problem is that,
264
00:22:25.380 --> 00:22:26.919
we don't want to
265
00:22:27.539 --> 00:22:29.640
do that to to our our
266
00:22:30.115 --> 00:22:32.375
user community because Python is really
267
00:22:32.755 --> 00:22:38.054
being used in production now. So I think that we are going to have to be more careful
268
00:22:38.600 --> 00:22:42.460
as we add new features and I think exercise additional judiciousness
269
00:22:42.840 --> 00:22:43.340
because,
270
00:22:43.799 --> 00:22:47.419
we want I think it's it's an important value to sort of maintain backwards
271
00:22:47.825 --> 00:22:49.125
or at least be,
272
00:22:49.664 --> 00:22:52.804
very cognizant of the cost of of breaking changes.
273
00:22:53.585 --> 00:22:59.990
And for somebody who is building on top of Streamlit, can you discuss a bit more detail about the overall workflow
274
00:23:00.290 --> 00:23:10.735
of what's involved in designing their script to be compatible with what Streamlit is expecting and some of the model as far as how you would go about deploying it for use by other people?
275
00:23:11.115 --> 00:23:13.855
So I think the most important point is that we
276
00:23:14.315 --> 00:23:14.815
don't
277
00:23:21.180 --> 00:23:28.985
Streamlit app. Our many of our use cases are people who already have existing Python scripts for training a model or for
278
00:23:29.445 --> 00:23:34.029
running a model on some data set, And so what we try to do is
279
00:23:34.570 --> 00:23:35.549
let the user
280
00:23:35.929 --> 00:23:36.429
instrument
281
00:23:36.889 --> 00:23:37.629
their script
282
00:23:38.169 --> 00:23:38.669
graphically.
283
00:23:39.035 --> 00:23:44.335
So, for example, anytime you have a variable in Python, so you could say x equals 3,
284
00:23:45.435 --> 00:23:49.370
in Streamlit, you can simply just remove that 3 and say x
285
00:23:49.830 --> 00:23:50.970
equals st.
286
00:23:51.270 --> 00:23:51.770
Slider.
287
00:23:52.550 --> 00:23:53.530
And now
288
00:23:54.710 --> 00:23:56.730
that x is a slider
289
00:23:57.145 --> 00:23:58.925
that can be changed and
290
00:23:59.305 --> 00:24:00.285
all of the downstream
291
00:24:00.665 --> 00:24:01.165
computation
292
00:24:01.625 --> 00:24:02.285
will be
293
00:24:02.825 --> 00:24:05.005
executed properly as a result of that.
294
00:24:05.740 --> 00:24:06.480
And so
295
00:24:06.860 --> 00:24:16.395
and that doesn't apply just to numbers. You can have all kinds of different inputs and you can actually even get into various kinds of control flow buttons and checkboxes and stuff
296
00:24:17.434 --> 00:24:19.055
and in a funny way,
297
00:24:19.675 --> 00:24:20.175
because
298
00:24:20.875 --> 00:24:23.775
the flow of a streamlet app
299
00:24:24.680 --> 00:24:27.980
follows the logical flow of a Python
300
00:24:29.160 --> 00:24:29.660
program,
301
00:24:31.134 --> 00:24:42.010
the UI follows that flow also. And so a very funny and sort of mysterious aspect of Streamlit I'd sort of love to write a blog post about it, if I can manage to crystallize this idea
302
00:24:42.390 --> 00:24:44.649
is how Streamlit GUIs
303
00:24:45.325 --> 00:24:48.465
tend to be logical from the user's perspective
304
00:24:48.924 --> 00:24:52.705
without a huge amount of effort or design required. Now, of course,
305
00:24:53.010 --> 00:24:53.990
you can also
306
00:24:54.530 --> 00:25:17.549
just clean slate a Streamlit app, and we we do that, for example, all the time. All of our dashboards, for example, of looking at downloads and GitHub stars and all the the ways in which we, the the telemetry on the Streamlit itself, we we have written our own dashboards for. And that's a a first class Streamlit app that we wrote that lets us look at it and understand these things. So so so you could really do it both ways. And and, certainly, you know,
307
00:25:18.010 --> 00:25:23.455
intentionally writing a Streamlit app makes it possible to also think a little bit about how to write things quickly.
308
00:25:23.835 --> 00:25:27.294
We have some caching technology that allows you to save
309
00:25:27.660 --> 00:25:32.720
computation and reuse it across runs, so there's lots of neat stuff you can do there. Then,
310
00:25:33.740 --> 00:25:37.405
as far as the final part of the story arc is
311
00:25:38.125 --> 00:25:39.585
deployment. And right now,
312
00:25:40.445 --> 00:25:42.305
we don't have a solution to that.
313
00:25:42.685 --> 00:25:43.505
We're actually
314
00:25:44.365 --> 00:25:45.825
working on a
315
00:25:46.570 --> 00:25:48.750
solution which we're calling Streamlit for Teams
316
00:25:49.050 --> 00:25:50.590
and that's something that
317
00:25:50.890 --> 00:25:54.510
is designed to be a sort of enterprise version of Streamlit,
318
00:25:54.895 --> 00:25:58.595
but at the same time, the community has now written, you know, probably
319
00:25:59.295 --> 00:26:03.715
1 or 2 dozen articles about how to deploy Streamlit on EC2, on Heroku,
320
00:26:04.640 --> 00:26:10.740
and so that's great too and we really encourage that and we've been, reading those articles carefully, so thank you guys for writing them,
321
00:26:11.040 --> 00:26:14.100
and we want to make sure that there are also great open source
322
00:26:14.785 --> 00:26:16.245
solutions for deploying Streamlit.
323
00:26:16.865 --> 00:26:18.325
And 1 of the
324
00:26:18.705 --> 00:26:19.684
things that I'm
325
00:26:19.985 --> 00:26:28.640
working to understand is because of the fact that you're building on top of scripts that have a logical progression of run from start to finish.
326
00:26:29.100 --> 00:26:34.715
And in terms of my experience of building web apps, they're generally run-in some sort of demonizing process.
327
00:26:35.174 --> 00:26:35.835
I'm curious
328
00:26:36.294 --> 00:26:38.955
how that affects the way that you
329
00:26:39.390 --> 00:26:47.250
run the Streamlit application and how you make sure that it's always available for user input. And then also some of the challenges as far as
330
00:26:47.804 --> 00:26:50.225
trying to make some of these Streamlit applications
331
00:26:50.605 --> 00:26:57.790
multi user capable, where you might have more than 1 person interacting with it at a given time? So that is really the,
332
00:26:58.830 --> 00:27:03.490
tech of Streamlit is exactly solving the challenge. And so the the actual
333
00:27:03.915 --> 00:27:18.000
coding that we do, not the design not the API design and all that stuff the API design is just, you know, designed to be very simple. There's actually very few function calls in Streamlit. There's probably a couple dozen. But underneath the hood, a great deal is happening to
334
00:27:18.465 --> 00:27:27.045
to enable exactly what you're describing. And so that's 1 of the reasons why we don't just Python run your script, we Streamlit run it, is because, in fact, Streamlit creates
335
00:27:27.505 --> 00:27:28.165
a server,
336
00:27:28.690 --> 00:27:30.150
a multi threaded server.
337
00:27:30.610 --> 00:27:35.350
Every time your script is run, it's in a separate thread that's isolated from all the others. We
338
00:27:35.775 --> 00:27:36.935
preempt threads when,
339
00:27:37.375 --> 00:27:38.595
when events come in.
340
00:27:38.975 --> 00:27:53.145
We have our own sort of queuing system on top of the, WebSocket layer, which allows events to go from Python to to the web browser and back, and then we do a great deal of caching and deduping
341
00:27:53.845 --> 00:27:56.185
to make everything fast. So for example,
342
00:27:57.045 --> 00:28:02.149
if the user changes an input like in that example before x equals 3 it becomes a slider
343
00:28:02.450 --> 00:28:04.470
and we recognize that
344
00:28:05.575 --> 00:28:11.115
the graphical elements above that point in your script haven't changed. It's looked very much like React in some ways.
345
00:28:11.495 --> 00:28:12.554
We have a
346
00:28:12.980 --> 00:28:14.440
hashing, caching, and deduping,
347
00:28:15.220 --> 00:28:18.200
happening at almost every layer of Streamlit
348
00:28:18.580 --> 00:28:23.164
to to sort of make your app as performant as possible. And that that is
349
00:28:23.544 --> 00:28:25.965
a little bit of deep magic. And at times,
350
00:28:26.424 --> 00:28:31.460
it doesn't quite do what the user wants or or or, you know, it requires a little bit of sophistication
351
00:28:32.159 --> 00:28:32.820
to understand
352
00:28:33.519 --> 00:28:38.419
why this might be fast or slow. And so that's actually something that we're thinking a lot about right now, and I think we have some really
353
00:28:38.835 --> 00:28:43.175
neat features coming out in the next few months, which are gonna, like, even more simplify,
354
00:28:43.715 --> 00:28:46.110
and have it work right the first time every time.
355
00:28:46.590 --> 00:29:04.174
Yeah. Particularly in the slider case, I can imagine that there's a fair bit of difficulty in terms of debouncing the signal, so that if somebody's playing with the slider a bunch and they haven't really settled on what they want the actual input to be, that you're not just constantly sending those signals back and forth between the app and causing it to be preempted so many times.
356
00:29:04.539 --> 00:29:14.445
Yeah. Yeah. That's that's a great point. And, oh, and I and I and I didn't also address the multi user, aspect of what you're saying, but, indeed, we have isolated, we call them sessions,
357
00:29:14.985 --> 00:29:21.510
so that 2 users sort of don't see 1 another even though they're running on the same Python process. So there's a there's a lot of really interesting
358
00:29:21.970 --> 00:29:23.570
stuff going on under the hood,
359
00:29:24.050 --> 00:29:38.265
and if I do say we also we also you know, I think some really wonderful engineers, most of us are, you know, from from great companies came and and worked on Streamlit and contributed and and helped to inform the company. And we we all we loved the code too, and it's very
360
00:29:38.640 --> 00:29:40.720
tested and commented and stuff. And so,
361
00:29:41.200 --> 00:29:52.775
if someone's really interested in how this all works, we would we would love to answer questions on the forums and and encourage you to actually read the code. It's all on GitHub. It's all, you know, open source, permissive license,
362
00:29:53.155 --> 00:29:58.294
so, so, you know, people are people are welcome to poke around and and see see how we're doing this.
363
00:29:59.110 --> 00:30:04.810
But, yeah, you're you're totally right. There's questions of, not over flooding the event queue
364
00:30:05.110 --> 00:30:07.290
because, that would not be a good thing.
365
00:30:09.095 --> 00:30:10.315
That would break the illusion.
366
00:30:11.735 --> 00:30:12.475
And then
367
00:30:12.855 --> 00:30:14.955
in terms of more advanced uses,
368
00:30:15.570 --> 00:30:38.850
so for somebody who's writing a simple script, they want a simple application. It's fairly straightforward as to how they would go about that. But what I'm wondering is for maybe the case of you with your dashboard for all these different Yeah. Metrics that you're using to measure the success of Streamlit. Mhmm. I'm wondering if you have any capacity for being able to compose together multiple apps that somebody has built with Streamlit into a single overall experience.
369
00:30:40.434 --> 00:30:48.455
Yeah. So totally. And, in fact, there's a really cool app that someone created called Awesome Streamlit. I think it's awesome dash streamlet.org,
370
00:30:49.429 --> 00:31:01.105
and it's sort of a meta app in the sense that other people can commit apps to it, and then you can run them and see different examples of of little code snippets and how they execute in Streamlit. It's really cool.
371
00:31:01.645 --> 00:31:06.385
So so that's an example that, and, in fact, the creator of of Awesome Streamlit,
372
00:31:06.845 --> 00:31:14.690
Mark, has been on our forums and has really been sort of pushing the the the limits of how do you do multi page apps in Streamlits on, you know,
373
00:31:15.365 --> 00:31:19.865
applications with lots and lots of files and so we've actually been learning a lot from his experience and improving
374
00:31:20.485 --> 00:31:20.985
streamlets.
375
00:31:22.220 --> 00:31:24.080
So it is absolutely possible
376
00:31:24.380 --> 00:31:26.400
to create those kinds of complex apps
377
00:31:28.220 --> 00:31:36.605
and moreover, as we gain more experience in building them, we are sort of adding even more sugar to make it a really, really fun experience.
378
00:31:37.465 --> 00:31:39.245
For people who are first coming to Streamlit,
379
00:31:40.029 --> 00:31:46.289
I'm curious, what are some of the types of feedback that you've seen as far as the types of tools or processes
380
00:31:46.590 --> 00:31:52.684
that they had been using previously that they've been able to replace with Streamlit Mhmm. And some of the other types
381
00:31:53.385 --> 00:32:02.750
of systems or frameworks that you consider to be in the same type of space that you can either use collaboratively or that Streamlit might replace or supplant?
382
00:32:05.985 --> 00:32:08.885
I'm sorry. Can you can you repeat the first part of the question? I apologize.
383
00:32:10.865 --> 00:32:11.365
Sure.
384
00:32:11.985 --> 00:32:21.645
Just curious what you have seen in terms of feedback of people who are coming new to Streamlit, who had existing workflows or processes, what types of technologies
385
00:32:22.265 --> 00:32:23.165
or workflows
386
00:32:23.785 --> 00:32:25.565
they are replacing with Streamlit?
387
00:32:28.105 --> 00:32:29.005
Yeah. So,
388
00:32:30.020 --> 00:32:33.640
the I think that there are a bunch of adjacent technologies,
389
00:32:34.420 --> 00:32:37.060
that sort of overlap 1 another in the same way that,
390
00:32:37.654 --> 00:32:45.274
you know, a Jupyter notebook and an Excel spreadsheet overlap. You could do the same things in both, but also they have distinct centers of gravity. And and similarly,
391
00:32:45.575 --> 00:32:49.210
you know, you could do interactive data exploration in Streamlit,
392
00:32:49.830 --> 00:33:08.850
but I would probably recommend Jupyter for that. You could also write an app in, in Jupyter, but we think Streamlit is, is a is a better experience for that kind of thing. So there's all these kinds of overlapping things. But I think, you know, in my experience, the the the thing that we actually had in mind the most was Flask,
393
00:33:09.550 --> 00:33:10.050
which
394
00:33:10.510 --> 00:33:19.795
is we really saw a lot of, ML engineers especially saying, you know, I just trained this model on this data set, and now I created a Flask endpoint,
395
00:33:20.575 --> 00:33:26.470
that you can go to and type in all kinds of URL parameters, and then I'm going to, like, barf out a bunch of HTML,
396
00:33:27.490 --> 00:33:33.510
that tells you about whatever it is you're interested in. And that's the tool that the whole team uses, and they're they all think it's amazing. Right?
397
00:33:33.875 --> 00:33:47.790
And so we were we were really thinking about how to make actually, Flask is is an amazing framework, and and, actually, we're thinking of of using it in Streamlit. But in that use case, it was really there was a sort of major impedance mismatch, and so so we were thinking
398
00:33:48.250 --> 00:33:50.190
about, you know, how do you
399
00:33:51.245 --> 00:33:51.745
interleave
400
00:33:52.445 --> 00:33:52.945
a
401
00:33:53.405 --> 00:33:58.225
neural net and all machine learning code into an interactive app in those kinds of use cases.
402
00:33:58.580 --> 00:34:01.320
In terms of other adjacent technologies, you know, there are,
403
00:34:01.860 --> 00:34:05.400
Plotly Dash is really cool. It's much more customizable
404
00:34:05.780 --> 00:34:14.825
visually than Streamlit and has a different kind of sort of event model than we do. And then if you're coming from the R world, Shiny is really cool.
405
00:34:15.285 --> 00:34:17.865
And, let's see. I think there's a panel,
406
00:34:19.030 --> 00:34:22.170
there's voila from Jupyter, and there are
407
00:34:22.550 --> 00:34:25.130
a bunch of other things. So I think there's a I think there's a growing
408
00:34:25.430 --> 00:34:26.170
sort of
409
00:34:26.470 --> 00:34:26.970
agreement
410
00:34:27.615 --> 00:34:30.515
that there is really a use case here that's been underappreciated,
411
00:34:31.295 --> 00:34:35.155
but, I think also, you know, Streamlit has a sort of a unique place in that firmament.
412
00:34:35.850 --> 00:34:57.670
In terms of some of the uses of streamlet, you mentioned that there have been a number of interesting or innovative ways that people have leveraged data. And I'm curious, what are some of the most notable that you think are worth calling out or some of the lessons that you've learned as a result of seeing the ways that people have been building Streamlit that you didn't necessarily think were possible or plausible?
413
00:34:58.370 --> 00:35:05.005
Yeah. I mean yeah. As I mentioned, we really started in our own mind with sort of internal tooling for ML and DS teams,
414
00:35:05.625 --> 00:35:10.760
and we've just seen this sort of explosion of cool apps being posted. And, in fact,
415
00:35:11.320 --> 00:35:19.580
a better answer might be just to, like, go to Twitter and search for Streamlit and see what people are putting up there. We've seen people build, like, explainer demos
416
00:35:19.914 --> 00:35:21.775
to help show off their models,
417
00:35:22.474 --> 00:35:25.615
you know, a cool NLP model or something. We've seen people,
418
00:35:26.234 --> 00:35:30.510
show off their just their GitHub repos, you know. Here's a useful
419
00:35:30.810 --> 00:35:32.590
repo to do x y z,
420
00:35:32.890 --> 00:35:37.835
and, oh, if you wanna see how it works, just run this Streamlit app and and all of a sudden you'll,
421
00:35:38.155 --> 00:35:41.935
be able to play really easily with my with my code. And,
422
00:35:42.475 --> 00:35:48.140
let's see. You know, we've seen people create dashboards for marketing teams. That's been really actually interesting for us is to see,
423
00:35:48.780 --> 00:35:50.720
for example, we're working with 1 company,
424
00:35:51.020 --> 00:35:55.855
which is where the researchers are building a recommendation engine for the sales team,
425
00:35:56.234 --> 00:35:58.815
and doing it in Streamlit allows them to
426
00:35:59.115 --> 00:35:59.615
basically
427
00:36:00.359 --> 00:36:03.580
directly create this app for the sales team, disintermediated
428
00:36:04.040 --> 00:36:11.535
by any kind of other, you know, app building team. And so that means that not only is time to market much faster, but the iteration cycle on,
429
00:36:11.835 --> 00:36:14.575
making changes to the app is really much shorter.
430
00:36:15.090 --> 00:36:19.830
Tools for operations team to view, data as it comes off self driving car.
431
00:36:20.370 --> 00:36:21.430
Annotation tools.
432
00:36:22.025 --> 00:36:26.765
Somebody created an app which lets you see all of the speakers at NeurIPS, the, AI conference.
433
00:36:27.625 --> 00:36:30.045
We've seen demos of people's AI research.
434
00:36:30.590 --> 00:36:34.050
So, yeah, there's a lot of, a lot of cool stuff out there.
435
00:36:34.590 --> 00:36:36.050
And in your own experience
436
00:36:36.430 --> 00:36:41.675
of building and evolving Streamlit, what have you found to be some of the most challenging or unexpected
437
00:36:42.055 --> 00:36:44.315
aspects of the technical implementation
438
00:36:44.695 --> 00:36:46.795
or lessons that you've learned in the process?
439
00:36:47.430 --> 00:36:52.250
Well, I mean, man, we understand Python way better than we ever thought we were going to.
440
00:36:52.710 --> 00:36:57.050
I think actually to your to your earlier question about the the different ML frameworks,
441
00:36:57.414 --> 00:36:58.714
1 thing that has
442
00:36:59.095 --> 00:37:02.315
the probably the most challenging thing has been
443
00:37:02.934 --> 00:37:04.555
TensorFlow and PyTorch
444
00:37:05.095 --> 00:37:05.595
because
445
00:37:06.210 --> 00:37:15.685
TensorFlow and PyTorch, each in their own way, are doing some deep, deep magic in Python, and they are kind of subverting the language to their
446
00:37:15.985 --> 00:37:19.285
own, for their own means. So, you know, typically in TensorFlow,
447
00:37:19.745 --> 00:37:27.980
a variable x isn't really a variable in the Pythonic sense. It's really a pointer to a to this graph of computation, which will be executed,
448
00:37:28.359 --> 00:37:38.505
at at an at a later time. And that has been tricky to weave into Streamlit because, in a sense, like those libraries, we also do some very deep magic
449
00:37:38.805 --> 00:37:42.970
and sort of subvert some of the naive assumptions about how Python program might work.
450
00:37:44.470 --> 00:37:44.870
But,
451
00:37:45.590 --> 00:37:51.130
so so that's been a that's been a really interesting challenge, and I think 1 of the goals has been to
452
00:37:51.585 --> 00:38:02.260
not just brute force solve those problems, but solve them elegantly so that that that, again, the idea was always that you wouldn't write a Streamlit app with the
453
00:38:02.720 --> 00:38:11.755
idea of writing an app. You would write it with the idea that you'd already done something else and then you wanted to to make it interactive in some way, and we wanted to make that just a super fast process.
454
00:38:12.455 --> 00:38:16.135
So that that's been really fun. And, of course, you know, Python 23, we we have,
455
00:38:16.880 --> 00:38:26.420
still a bunch of people who use Python 2, and that's a very, very intricate thing to do sort of complex Python programming as a library builder because you have to support both simultaneously.
456
00:38:27.025 --> 00:38:34.960
In light of your work on digging into some of the guts of Python and making it do things that are potentially unexpected
457
00:38:35.260 --> 00:38:37.119
or out of the bounds of normalcy
458
00:38:37.420 --> 00:38:43.760
and your experience of seeing the same being done in things like PyTorch and TensorFlow. I'm curious what you see as being
459
00:38:44.105 --> 00:38:48.525
some of the future evolutionary paths of the language and the overall ecosystem
460
00:38:48.825 --> 00:38:53.289
for people who are working, you know, with Streamlit or in the machine learning space
461
00:38:53.670 --> 00:38:55.289
or just broadly within Python?
462
00:38:55.670 --> 00:38:56.890
We've really been
463
00:38:57.190 --> 00:38:59.930
trying to create really simple,
464
00:39:00.825 --> 00:39:02.445
APIs that often do
465
00:39:02.905 --> 00:39:04.445
complicated things, and
466
00:39:04.825 --> 00:39:12.930
and at times we find ourselves running up against the limits of the language itself, I must say, just the syntactic limit of the language sometimes,
467
00:39:13.549 --> 00:39:16.690
it's difficult to express some things in Python. And so,
468
00:39:17.475 --> 00:39:20.215
as a very simple example, there's,
469
00:39:21.475 --> 00:39:24.055
not really a notion of blocks.
470
00:39:24.355 --> 00:39:26.135
The closest thing is sort of
471
00:39:26.490 --> 00:39:28.510
function decorators or if statements
472
00:39:28.810 --> 00:39:29.310
or
473
00:39:29.690 --> 00:39:30.510
with statements
474
00:39:31.130 --> 00:39:31.630
and,
475
00:39:32.090 --> 00:39:35.950
the interst the sort of Venn diagram of those 3
476
00:39:36.535 --> 00:39:37.035
constructs
477
00:39:37.735 --> 00:39:44.955
leaves a lot of room, actually, for interesting things that you might want to do naturally and so we we think really, really hard about how to
478
00:39:45.360 --> 00:39:56.615
create syntactic constructs that will make sense in the Python programmer's mind that also allow us to do these interesting things that we want. And so, as, you know, as the as the language as, sorry, as Streamlit has evolved,
479
00:39:57.155 --> 00:39:59.974
we we really been thinking about what are,
480
00:40:00.915 --> 00:40:05.790
some ways that, like, you know, maybe like multi line anonymous functions
481
00:40:06.170 --> 00:40:08.910
or sort of more generalized syntactic structure,
482
00:40:09.369 --> 00:40:14.175
also various pre processing things on a python script that we could do to,
483
00:40:14.875 --> 00:40:16.335
to to make the language
484
00:40:17.515 --> 00:40:20.575
a very natural and beautiful fit for these use cases,
485
00:40:21.390 --> 00:40:22.130
of course,
486
00:40:22.910 --> 00:40:26.530
while trying to maintain that just incredible simplicity
487
00:40:26.830 --> 00:40:27.810
and understandability
488
00:40:28.270 --> 00:40:32.755
that at the core of Python. So, that's a that's a big challenge, and I think,
489
00:40:33.214 --> 00:40:36.195
it's 1 that Python has historically been
490
00:40:36.760 --> 00:40:37.260
exceptional
491
00:40:37.560 --> 00:40:44.780
at and, and so we I think we wanna tread very delicately there. But but certainly, we're running it up against some interesting,
492
00:40:45.994 --> 00:40:47.214
both, logical
493
00:40:47.755 --> 00:40:57.860
and or sort of operational and also syntactic limitations of the language. And so, excited to to see how those things evolve over time and and hopefully, play a role in them actually if we could.
494
00:40:58.480 --> 00:41:09.245
And for Streamlit itself, what do you have in store for the future of the project and any of the adjacent products and services that you're looking to build to tie into its ecosystem?
495
00:41:09.960 --> 00:41:10.680
Oh, yeah.
496
00:41:11.000 --> 00:41:13.020
So so exciting. So
497
00:41:13.480 --> 00:41:15.720
first of all, if you are a Streamlit user,
498
00:41:16.200 --> 00:41:25.525
a lot of people have had problems with caching, which is 1 of our big features. And so we're we're working on a lot of improvements there, so we've heard you, and we're we're we're doing some cool stuff.
499
00:41:26.465 --> 00:41:26.965
Then
500
00:41:27.660 --> 00:41:34.960
we have a bunch of features which we think are really going to expand the range of possible Streamlit apps. So we have we're working on horizontal
501
00:41:35.260 --> 00:41:37.360
layout and other kinds of layout primitives
502
00:41:38.365 --> 00:41:39.425
and also on
503
00:41:39.805 --> 00:41:42.224
better handling for app state,
504
00:41:43.484 --> 00:41:47.550
making and so it'll make Streamlit more useful for, like, annotation problems, for example.
505
00:41:48.430 --> 00:42:01.365
There's a bunch of really cool features that that the community has asked for that are sort of smaller and but we we really get why they're important to people, and we're just are trying to make sure that we save enough space in in our end cycles to
506
00:42:01.744 --> 00:42:08.440
to develop those and get those out. And also I'd encourage, people who are excited about adding this or that feature to Streamlit to reach out.
507
00:42:08.920 --> 00:42:11.020
We really would love community help.
508
00:42:11.615 --> 00:42:13.075
And then the 2 big,
509
00:42:13.454 --> 00:42:17.474
the 2 big ones, which are coming down the mill, are a plug in system,
510
00:42:18.335 --> 00:42:19.474
which will basically
511
00:42:19.934 --> 00:42:22.100
allow people to write their
512
00:42:22.560 --> 00:42:26.820
own React components and and then wire those into Streamlit sort of seamlessly,
513
00:42:27.200 --> 00:42:28.740
and the auto deploy,
514
00:42:29.280 --> 00:42:30.420
Streamlit for Teams,
515
00:42:30.745 --> 00:42:32.445
which, which is the enterprise,
516
00:42:32.825 --> 00:42:35.725
solution for Streamlit and also something that we hope to
517
00:42:36.185 --> 00:42:41.380
figure out a way to to give for free to the community as well. So that's that's something that we're working on,
518
00:42:41.840 --> 00:42:45.620
both technically a lot but also from a sort of a business perspective.
519
00:42:46.320 --> 00:42:53.464
We want to keep the lights on, but we also wanna get Streamlit out to as many people as possible. So those that that's kind of the roadmap right now, and,
520
00:42:54.184 --> 00:42:57.005
each 1 of those, I think, in its own way
521
00:42:57.930 --> 00:43:03.230
adds a new dimension to Streamlit that I'm just so excited about. So, you know, right now, it's
522
00:43:03.530 --> 00:43:08.515
a it's a square, but the next feature will make it a cube, and the next feature will make it a
523
00:43:09.135 --> 00:43:20.740
tesseract, and so on, and, and I think that's something I'm just super, super looking forward to. So I think we're just the beginning of the of the journey, and and I can't wait to can't wait to keep going.
524
00:43:21.595 --> 00:43:30.655
And in terms of the governance and sustainability of the project, I'm curious how you are approaching that given that it is open source
525
00:43:30.960 --> 00:43:40.020
for the actual code, but you're also trying to build and maintain a business around it, and just how you see those dividing lines, and how you're trying to make sure that you're,
526
00:43:40.375 --> 00:43:42.395
keeping the needs of the community forefront.
527
00:43:43.175 --> 00:43:44.715
Yeah. As I mentioned,
528
00:43:45.975 --> 00:43:50.120
sort of crowdsourced input from the community has been the driving start of
529
00:43:50.600 --> 00:43:53.820
evolution from the start even when we were in closed beta.
530
00:43:54.120 --> 00:43:54.620
And
531
00:43:55.960 --> 00:43:56.860
we recognize
532
00:43:57.240 --> 00:43:58.140
now with,
533
00:43:58.840 --> 00:44:03.635
sort of the huge amount of interest and the rapid growth in the community that
534
00:44:04.255 --> 00:44:04.755
scaling
535
00:44:05.375 --> 00:44:06.515
our community
536
00:44:06.815 --> 00:44:07.315
involvement
537
00:44:07.930 --> 00:44:16.910
is going to be a major challenge, and in many ways I think that we are the bottleneck right now. The number of questions coming in and and GitHub issues
538
00:44:17.405 --> 00:44:20.945
is sort of larger than our ability to
539
00:44:21.245 --> 00:44:26.705
to handle it, quite frankly, so we are really interested actually in in how we can
540
00:44:27.160 --> 00:44:31.900
have the community play a role in understanding the issues that people are having,
541
00:44:32.360 --> 00:44:34.700
helping 1 another, and triaging,
542
00:44:35.320 --> 00:44:36.380
triaging bugs
543
00:44:37.174 --> 00:44:37.974
and and actually contributing code.
544
00:44:39.734 --> 00:44:55.735
So that's something that's that, you know, our our attitude towards this is we really are looking forward to to working with the community and and and building a structure of community government and and having the community have a a sense of ownership
545
00:44:56.195 --> 00:45:10.805
over the future of the product. And, that's that's something that's evolving right now and, or rather I should say, that's something that we are thinking a lot about right now and so actually, in that spirit I really would encourage people who have thoughts about
546
00:45:11.285 --> 00:45:15.865
great community governance models and other open source projects to reach out and
547
00:45:16.165 --> 00:45:18.265
write something down in the forums
548
00:45:18.600 --> 00:45:21.080
and let us know and let the other community members,
549
00:45:21.640 --> 00:45:27.260
react to it. We are really paying attention, and our goal is to
550
00:45:28.065 --> 00:45:28.964
share ownership
551
00:45:29.345 --> 00:45:38.440
and and share a stream with the world. That's, you know, that that's ultimately the goal here. This this all before this was a company, this was just a cool project, and, you know, I really
552
00:45:38.980 --> 00:45:41.480
think it would be so much fun to to
553
00:45:42.395 --> 00:45:45.695
to to sort of get as many people involved as possible.
554
00:45:46.395 --> 00:45:55.910
Are there any other aspects of the Streamlit project itself or the ways that it's being used or your goals for it that we didn't discuss yet that you'd like to cover before we close out the show?
555
00:45:57.570 --> 00:46:10.420
No. No. I think we, yeah, I think we got a lot. And for for anybody who wants to follow-up with you or get in touch and keep up to date with the work that you're doing, I'll have you add your preferred contact information to the show notes. And with that, I'll move us into the picks.
556
00:46:10.799 --> 00:46:21.145
And this week, I'm going to choose the book of why by Judea Pearl, which I've been reading recently. I'm still only partway into it, but so far, it's been quite interesting. And it's discussing
557
00:46:21.445 --> 00:46:25.225
his views on some of the issues around how to
558
00:46:26.069 --> 00:46:26.569
systematically
559
00:46:27.030 --> 00:46:28.170
represent causation
560
00:46:28.790 --> 00:46:30.089
and not just correlation
561
00:46:30.390 --> 00:46:43.345
and some of the ways that that's important in our current age of computing and artificial intelligence. And he's actually 1 of the touring award winners, so definitely somebody who has a lot of thoughts and a context on the matter. So
562
00:46:43.670 --> 00:46:48.310
definitely recommend checking that out. And so with that, I'll pass it to you, Adrianne. Do you have any picks this week? Yeah.
563
00:46:48.950 --> 00:46:50.490
I think 1 of the most
564
00:46:50.875 --> 00:46:52.815
touching books that I've read recently
565
00:46:53.115 --> 00:46:55.934
is called No Self, No Problem
566
00:46:56.555 --> 00:46:57.855
by Anam Tubton.
567
00:46:58.530 --> 00:47:01.750
And there are a couple of books with that name, believe it or not.
568
00:47:02.290 --> 00:47:05.030
Anam Thupten is the Tibetan Buddhist
569
00:47:05.555 --> 00:47:08.515
monk who wrote a book with that name, and,
570
00:47:09.475 --> 00:47:10.135
the thing
571
00:47:11.155 --> 00:47:13.335
about this book that's so special
572
00:47:13.715 --> 00:47:14.215
is
573
00:47:14.980 --> 00:47:15.880
it's not
574
00:47:16.260 --> 00:47:20.040
at all sort of religious in some ways. It doesn't,
575
00:47:20.819 --> 00:47:22.920
certainly doesn't ask you to believe anything,
576
00:47:23.460 --> 00:47:26.665
and yet it's written with this sort of exquisite
577
00:47:26.965 --> 00:47:27.465
precision
578
00:47:28.405 --> 00:47:28.905
about
579
00:47:29.925 --> 00:47:30.665
the world
580
00:47:31.819 --> 00:47:32.720
through the eyes
581
00:47:33.020 --> 00:47:34.160
of a so called
582
00:47:34.460 --> 00:47:35.520
enlightened being.
583
00:47:35.980 --> 00:47:36.460
And,
584
00:47:36.859 --> 00:47:40.144
it's it's really it's it's just so
585
00:47:40.444 --> 00:47:40.944
unapologetically
586
00:47:42.285 --> 00:47:43.984
and and beautifully states
587
00:47:44.444 --> 00:47:47.025
there's this way of of looking at the world,
588
00:47:47.650 --> 00:47:56.870
that's accessible to everyone. And when you read it, you I I just feel like, of course, that's true. And and I was really just touched to the bottom of my heart.
589
00:47:57.715 --> 00:48:02.695
Well, thank you very much for taking the time today to join me and discuss your experiences
590
00:48:02.995 --> 00:48:04.430
building the Streamlit application.
591
00:48:05.069 --> 00:48:16.234
Definitely a very interesting tool and 1 that I am excited to start playing around with. So thank you for all of your efforts on that front, and I hope you enjoy the rest of your day. Yeah. Thank you. That would be great. Thank you.
592
00:48:19.494 --> 00:48:24.630
Thank you for listening. Don't forget to check out our other show, the Data Engineering podcast at dataengineeringpodcast.com
593
00:48:26.130 --> 00:48:27.910
for the latest on modern data management.
594
00:48:28.770 --> 00:48:40.030
And visit the site at python podcast dotcom to subscribe to the show, sign up for the mailing list, and read the show notes. And if you've learned something or tried out a project from the show, then tell us about it. Email host at podcastinit.com
595
00:48:40.810 --> 00:48:41.630
with your story.
596
00:48:42.490 --> 00:48:46.590
To help other people find the show, please leave a review on Itunes and tell your friends and coworkers.