Latest / Talk Python To Me / #430: Delightful Machine Learning Apps with Gradio
Transcript
- 0:00You've got this amazing machine learning model you created, and you want to share it and let your colleagues and users experiment with it on the web.
- 0:06How do you get started? Learning Flask or Django?
- 0:09Great frameworks, but you might consider Gradio, which is a rapid development UI framework for ML models.
- 0:16On this episode, we have Freddie Bolton to introduce us all to Gradio.
- 0:20This is Talk Python To Me, episode 430, recorded August 10th, 2023.
- 0:24Welcome to Talk Python To Me, a weekly podcast on Python.
- 0:40This is your host, Michael Kennedy.
- 0:42Follow me on Mastodon, where I'm @mkennedy, and follow the podcast using @talkpython, both on fosstodon.org.
- 0:50Be careful with impersonating accounts on other instances. There are many.
- 0:53Keep up with the show and listen to over seven years of past episodes at talkpython.fm.
- 0:58We've started streaming most of our episodes live on YouTube.
- 1:02Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of that episode.
- 1:10This episode is brought to you by JetBrains, who encourage you to get work done with PyCharm.
- 1:16Download your free trial of PyCharm Professional at talkpython.fm/done dash with dash PyCharm.
- 1:24And it's brought to you by Sentry.
- 1:26Don't let those errors go unnoticed.
- 1:28Use Sentry.
- 1:29Get started at talkpython.fm/sentry.
- 1:32Brady, welcome to Talk Python To Me.
- 1:35Thanks for having me, Michael.
- 1:36Yeah, it's great to have you here.
- 1:37I think people are going to learn a lot about some machine learning on this episode.
- 1:41And you've got this really cool visual way, this visual tool of working with machine learning projects.
- 1:47And oftentimes people ask me, I'm not really a web developer, but I have some machine learning stuff or I'm a data scientist and I want to share with people.
- 1:55How do I do that?
- 1:56So your project might be a good answer to that for some folks, right?
- 1:59Yeah, absolutely.
- 2:00I think, yeah, Gradio is built for that use case.
- 2:03I think you can build like lots of complex stuff with Gradio, web apps and stuff, but you could, it's optimized for the ML use case.
- 2:11Like how do you get like an ML workflow, like on the web and share it with people as quickly as possible?
- 2:16That's kind of what Gradio is built for.
- 2:17I've got it running my computer.
- 2:19How do I take it from a notebook to something that other people who are not programmers can use, right?
- 2:23Yeah, exactly.
- 2:24That's kind of it.
- 2:25And it's with Gradio, it's one line.
- 2:26You can get a shareable link directly from your Colab notebook, Jupyter notebook, SageMaker, local, whatever.
- 2:32Yeah, so it's really easy to share with people.
- 2:35Excellent.
- 2:35All right, before we dive into that, let's start with you.
- 2:38A quick story, quick introduction about you and how you got into programming Python.
- 2:42Yeah, absolutely.
- 2:42So all the way from the beginning, I graduated with a degree in statistics and my first job was working as a data scientist in Chicago.
- 2:50And that was doing more like bread and butter data science-y stuff.
- 2:54Like you pull data from like database and like you train a model and then you like try to communicate the results with someone.
- 2:59And then at the time, yeah, I mean, it wasn't that long ago, but to me, it feels like it was like a millennia ago.
- 3:05Technologically speaking, it's so different.
- 3:07Yeah.
- 3:07Yeah, it was like a really long time ago.
- 3:09Yeah.
- 3:09But then basically like what happens or what happened to me a lot was just like, okay, like we need to like, we're training this model.
- 3:15Like how do we share, like share with the relevant like stakeholders, right?
- 3:18There's like a PM or like someone that's interested in this.
- 3:21Like how do you, how do we, how do you make them care?
- 3:23And then there really wasn't a good answer.
- 3:24Like you would have to like, you'd like compute like some metrics and then try to explain what they mean.
- 3:29And you like draw like a bar plot or something.
- 3:31And it just wasn't really that useful.
- 3:33And I think it really was, to be fair, it was like a skill gap.
- 3:36I didn't even know how to build like an interactive website to share with people.
- 3:40Because at the end of the day, what really, what people really care about or how to make someone really care about it is they can play with it.
- 3:46Right.
- 3:46Because if you show them these plots and these metrics, it's like a machine learning model is like very abstract.
- 3:51Right.
- 3:52It's like just this thing that's somewhere else.
- 3:54And then this is like the output of it, but it's not really even like the actual output.
- 3:57It's just like some sort of summary statistics of it.
- 4:00Right.
- 4:00But if you give someone like this is what the model is and you can let them like manually play with the inputs and see how the outputs change.
- 4:06They get a sense of, well, like what the model is and how it works and stuff like that.
- 4:12Right.
- 4:12And I think that's where I learned about this problem and why this problem is important.
- 4:17And then ever since then, I've been sort of devoting to devoting myself to working on like open source tools to like make data science like more efficient.
- 4:24And like my, my, the latest product that I worked on is called Gradio, which kind of does this.
- 4:29It basically lets you turn a machine learning function into a web app in one line of code.
- 4:33And from there you can jump off and build like as complex of a web app as you want.
- 4:38But from the beginning, you can get up and running with just like basically two lines of code.
- 4:43So yeah.
- 4:43Excellent.
- 4:44A little bit about me.
- 4:45You talked about let people play with the machine learning model and you change the inputs and stuff.
- 4:50It just completely changes the round trip speed because the alternative might be, I'll make, I'll get you a PDF and you can read the report.
- 4:58And then what if we change this?
- 4:59All right.
- 5:00At tomorrow's meeting, I'll bring the new PDF.
- 5:02Just empower people and give them these tools.
- 5:05And yet at the same time, data scientists are not web developers, certainly not in the super dynamic front end Ajax callback way of programming.
- 5:13Right.
- 5:14That's a different skill to be sure.
- 5:16And so it's not like their data science skills by default make them able to build these.
- 5:21And even if you could, is it a good use of your time?
- 5:23Right.
- 5:23Yeah, absolutely.
- 5:24And yeah, so it's like the PDF report is definitely like one, one way of doing it.
- 5:28The other way that we tried to do sometimes is we'll just hand it off to someone and we'll, we'll have them build the web.
- 5:33But then that just takes longer.
- 5:34You have to like explain everything to them.
- 5:36Right.
- 5:36I think like the, make it really impactful as if the person who made the model can they themselves, they can just create the web app, the demo, like immediately.
- 5:44A lot of these, a lot of data scientists are in Python, right?
- 5:46So that kind of means you need like a Python based tool to get you up and running really quickly.
- 5:51And a lot of them, yeah, like you said, don't know about web programming.
- 5:53So you've got to like abstract that away as much as you can, like as much as it makes sense.
- 5:57So that they're not like daunted or it's not like, okay, now I'm like, I'm really good at PyTorch and training or like all these things.
- 6:03And like now I need to learn about whatever, like servers and all that stuff.
- 6:07It's like, it's like almost a different skill set for a lot of people.
- 6:10It really is.
- 6:10And the handed off to somebody else, it's also, it's slow, but also it only works for certain situations, right?
- 6:16Like a lot of data scientists, I suspect don't have a whole software team supporting them as they need, right?
- 6:22They're the sole person at their company.
- 6:25So you said you had gone into statistics and found your way over to this side of that world.
- 6:29You feel like it's a golden age for statisticians now, because when I went to college, it's like, well, you could be an actuary or you could work at an insurance company.
- 6:39Or maybe some other company might be interested in hiring somebody who does stats.
- 6:43You could work at the U.S. Bureau of Statistics.
- 6:46Yeah, exactly.
- 6:47And that was, and now with the kind of blending into data science, there's just so in demand.
- 6:53So when it was like, the world is so open for that now.
- 6:55It definitely became a much sexier career.
- 6:58And I think I got lucky that I got into it like right before, right as it was starting to take off.
- 7:03Like at that point, like data science wasn't really like a term yet.
- 7:07I'm not that old, but yeah, at that time it wasn't really.
- 7:09There were like, I think at that point, like they were called, it's like research scientists was more like the term, right?
- 7:15Which still sounds a little bit dry, but then it got rebranded as data science.
- 7:18Yeah.
- 7:19I mean, I think it's a, I mean, I would say it's always a good time to study statistics.
- 7:22I think like a lot of people, if someone were to come back to me and say, I have no idea what I want to major in, but I have some aptitude for math.
- 7:28I would say like major in statistics.
- 7:29I think it's like really useful.
- 7:31It has like a lot of applications.
- 7:32But I think now also in terms of tech, I feel like definitely like it's sort of like the, it's the era of the Renaissance person, right?
- 7:39Like you have to know a little bit of everything now.
- 7:41Like, right.
- 7:42Cause it's like stats, programming, math.
- 7:45Like all these things are starting to like blend it, blend together.
- 7:48And yeah, I think it's like a lot of people I really respect pulled from all these disciplines, like seamlessly.
- 7:53Right.
- 7:54And I think it's, yeah, I think that's kind of where we are now.
- 7:56Yeah.
- 7:57It's a super fun time.
- 7:58If you're excited about always learning new things and sort of bettering yourself and bringing in this thing and mixing it that way.
- 8:04If you'd rather just be done learning, maybe not so much.
- 8:07Absolutely.
- 8:08Can't just show up for 20 years.
- 8:10It'd be okay.
- 8:10I guess if you were like maintaining COBOL to code, it would be okay.
- 8:14But not in the machine learning space and machine learning also is just crazy.
- 8:18We've got large language models just running loose everywhere now.
- 8:22What do you think about all that?
- 8:23It's definitely like a very exciting time to be alive.
- 8:26I think it's pretty crazy that when I got started in ML six years ago, it was, it definitely was like very niche.
- 8:32Right.
- 8:32And like the tools that people use and like the language about it definitely did not penetrate the mainstream.
- 8:37But now it seems like, like the technologies and the algorithms, the models, the datasets are all things that people talk about now.
- 8:43Right.
- 8:44And I think we've all had an older relative ask us about ChatGPT or like the latest trend or stable diffusion with the image, the AI image generation.
- 8:52I think it has penetrated every part of this.
- 8:55I think like part of the reason why that is, is one, because like one, like the technology is like way more impressive now.
- 9:00Right.
- 9:00Like these algorithms are able to do things that were unimaginable, like 2017, right.
- 9:05When I graduated college.
- 9:06But also it's just, these models are much easier to share and use now.
- 9:10Right.
- 9:10And I think part of the reason why ChatGPT is so, we took off so quickly, which is like the interface is so intuitive.
- 9:16It is.
- 9:16We've been chatting with each other for like decades, like over the internet.
- 9:20Right.
- 9:20And the user interface is so simple and it works.
- 9:23So fits our mental model so quickly or so easily.
- 9:27But, you know, under the hood, it's like this incredibly complex process.
- 9:30Right.
- 9:30Right.
- 9:31Right.
- 9:31Yeah.
- 9:32Right.
- 9:32And I think that's like where tools like radio come into play.
- 9:35Right.
- 9:35It's just, there's a bunch of like incredible, like amazing research happening, but unless other people can use it, play with it, evaluate it, like it's almost as if it doesn't exist.
- 9:45Right.
- 9:45And I think radio really helps you create like a demo, an app that other people can use and play with and evaluate your model.
- 9:52And then, and then just like that, anyone can use it.
- 9:54Right.
- 9:55Like, you don't, you no longer have to be like a technical person and you don't have to like type on some script or something and then go to a website.
- 10:01Right.
- 10:01You can just go to a website, right.
- 10:03You can just send someone a link and then they can play with the state of the art.
- 10:05It's pretty, pretty cool.
- 10:06Can you control a combo box and a button?
- 10:09Yeah.
- 10:09Something like that.
- 10:10Right.
- 10:10Yeah.
- 10:10Then you're qualified.
- 10:11It's wild.
- 10:11One of the things that surprises me is for such insane technology that leverages so many servers to chat to PT and friends, the user interface for it is so mundane.
- 10:23I don't mean that as a derogatory term, but it's just like, well, you just talk to it in this text box and it just talks.
- 10:28There's not like a crazy new UI where you put on 3D glasses.
- 10:32It's just a chat box.
- 10:34But what it does is incredible.
- 10:36Similar for mid journey and other things.
- 10:38You just slash imagine, just chat with it.
- 10:41But so there's this sort of weird paradox of this incredible, simple way to interact with it.
- 10:47And yet what it does is, I guess it's a natural way to interact with it, which is what's surprising.
- 10:52Yeah.
- 10:52Part of the reason, I think it's just like the natural language interface.
- 10:55I think a lot of people resonate with that.
- 10:57I think you don't have to explain that.
- 10:59Right.
- 10:59Like you just type something and then it'll respond.
- 11:01Right.
- 11:01Like it won't error.
- 11:02Right.
- 11:03And I think even like stuff that isn't just purely chat based, I think like stable diffusion, like the web UI.
- 11:09Right.
- 11:09I think it's, it has a lot of controls.
- 11:11Right.
- 11:11But at the end of the day, it's like a Photoshop-esque interface.
- 11:15Right.
- 11:15Where it's like someone who's used to that kind of software, like it's what they expect, right?
- 11:20You like upload an image and then you like, you can like get a tool to blur something out and then you can intaint it or outpaint it and stuff like that.
- 11:28So I forget who said it, but I think someone, someone said that MLs, it's not really like the product.
- 11:33It's like the, like in the background, right?
- 11:35Like the most successful ML products, they don't really feel like they're ML.
- 11:39Right.
- 11:40It's like the MLs, like abstracted away and it just makes your experience like that much better.
- 11:44Right.
- 11:44And I think that's what all these different tools are showing.
- 11:47Amazing.
- 11:47All right.
- 11:48So let's talk about Gradio and I'm going to ask you just something a little bit funky to kick this off, but let's talk about what just what other apps are like Gradio.
- 11:57So things that come to mind for me are like StreamYard, for example.
- 12:01Streamlit?
- 12:01Sorry, that's what I mean.
- 12:02Yeah.
- 12:03Stream, I'm reading the words of our app that we're using.
- 12:06Streamlit, not StreamYard.
- 12:07Streamlit and other, just give people a sense of what are the categories of apps that's in the same space so they can get a mental model for what
- 12:14Gradio is.
- 12:14For sure.
- 12:15Yeah.
- 12:15So I think like Streamlit is a good comparison.
- 12:17Like Plotly, Dash, I think is also in the same ecosystem.
- 12:22Shiny, if I think.
- 12:24Yeah.
- 12:25I think like the first programming language.
- 12:26Yeah.
- 12:27I just had Joe on to talk about Shiny for Python.
- 12:29Yeah.
- 12:30Recently, yeah.
- 12:30They're all definitely in the same ecosystem.
- 12:32If you go to the Gradio homepage, Gradio.app, you can see some of the apps that you can build with Gradio really quickly.
- 12:39Absolutely.
- 12:40Yeah.
- 12:40But that doesn't necessarily limit.
- 12:42Like what you see on the landing page is not all that you can build with Gradio.
- 12:45I think those are just like the eye-catching quick examples just because, like I said, like Gradio is built to get these kind of examples up and running really quickly.
- 12:53But you can do like lots of complex stuff with Gradio.
- 12:56Excellent.
- 12:57Yeah.
- 12:57So let's dive into it.
- 12:59So you've already given a bit of an introduction for us.
- 13:02Maybe we could work, just start by discussing how you might take, you've got some different types of problems you can solve on your homepage.
- 13:08And it shows you the code, the entire code.
- 13:11Yeah.
- 13:12Then the UI that comes out of it.
- 13:14So maybe you could just talk us through the sketch recognition.
- 13:16It's one of the types of UIs you could build here.
- 13:19So with the sketch recognition, you just, when you draw, it's definitely a bird I drew there.
- 13:23Or a mountain.
- 13:24I'm not sure.
- 13:24How do you think about Gradio?
- 13:25So Gradio is a Python library, right?
- 13:29Python is the main language used to interface or to build Gradio apps.
- 13:32Pip install Gradio.
- 13:33Yeah.
- 13:33You pip install Gradio, right?
- 13:35And then what does Gradio do?
- 13:36At the highest level, Gradio turns a Python function, any Python function into a interactive web app, right?
- 13:43So when you think of function, right?
- 13:45Function has inputs and outputs.
- 13:46So these inputs correspond, these inputs and outputs correspond to things that will be drawn on the page, right?
- 13:51And Gradio comes with a standard set of inputs, right?
- 13:55There's like text boxes, drop downs, number fields, data frames, plots, anything like that.
- 14:01But also like drawing tools like a sketch pad.
- 14:04And then the output, it can be any of these other components, but it could also be like a label, right?
- 14:09To show like a machine learning prediction.
- 14:11So all you need to do is take, write a plain Python function that takes in a drawing and returns a set of probabilities or competences.
- 14:18And then Gradio can wrap that in one line of code and turn it into an interactive web app.
- 14:24Like we see here, if you're on the YouTube stream, you can see what Michael is doing.
- 14:27There's like a sketch pad area and then he can scribble on it and then immediately he'll get a prediction out.
- 14:34Yeah.
- 14:34Let's see if I can draw an owl, maybe.
- 14:37Right.
- 14:37So it's like updating.
- 14:38Let's see how I do.
- 14:39I don't know.
- 14:39Yeah.
- 14:40Syringe.
- 14:40We've got to make the model better, right?
- 14:42It could be a cat.
- 14:44It definitely could be a cat.
- 14:45I can see cat.
- 14:46I can see.
- 14:47I think I've got to make my drawing better.
- 14:49But so the idea is you have a regular function that takes the inputs and outputs.
- 14:53There's no UI whatsoever.
- 14:54And there's also no reactive programming.
- 14:57You're not like hooking events where I redraw and it just reruns, right?
- 15:01That's not part of my code I write as a Python person.
- 15:04Right.
- 15:04And then you just say gr.interface, give it the function.
- 15:07And then you say the inputs are, in this case, you say it's just a sketch pad.
- 15:11And so I get this UI that I can draw on that I've been attempting to draw an owl on.
- 15:16It's probably missing the eyes.
- 15:17I think it's the eyes that are missing.
- 15:19The latter.
- 15:19It's not about testing the underlying model, is it?
- 15:24And then you say the outputs in our label.
- 15:26Now, a lot of UIs, people might think of label is just a non-interactive piece of text.
- 15:32But here, there's more of a machine learning label, right?
- 15:34You've got like a cool horizontal bar graph that has percentages and talks about its guesses.
- 15:39So it's like a machine learning labeled response report.
- 15:43A machine learning person would, when they see label, they think that,
- 15:47they don't think of the standard web, like just like a text box, right?
- 15:52Yeah.
- 15:52Like label four type of thing in HTML.
- 15:55Yeah.
- 15:55Right.
- 15:55So that's one of the things that, or one of the ways that kind of Gradio is built for that
- 15:59kind of audience, right?
- 16:00It's like the high-level perimedal, match that mental model.
- 16:07This portion of Talk Python To Me is brought to you by JetBrains and PyCharm.
- 16:11Are you a data scientist or a web developer looking to take your projects to the next level?
- 16:16Well, I have the perfect tool for you, PyCharm.
- 16:18PyCharm is a powerful integrated development environment that empowers developers and data
- 16:23scientists like us to write clean and efficient code with ease.
- 16:28Whether you're analyzing complex data sets or building dynamic web applications, PyCharm has
- 16:33got you covered.
- 16:34With its intuitive interface and robust features, you can boost your productivity and bring your
- 16:39ideas to life faster than ever before.
- 16:41For data scientists, PyCharm offers seamless integration with popular libraries like NumPy,
- 16:46Pandas, and Matplotlib.
- 16:47You can explore, visualize, and manipulate data effortlessly, unlocking valuable insights with
- 16:53just a few lines of code.
- 16:55And for us web developers, PyCharm provides a rich set of tools to streamline your workflow.
- 16:59From intelligent code completion to advanced debugging capabilities, PyCharm helps you write
- 17:04clean, scalable code that powers stunning web applications.
- 17:08Plus, PyCharm's support for popular frameworks like Django, FastAPI, and React make it a breeze
- 17:14to build and deploy your web projects.
- 17:16It's time to say goodbye to tedious configuration and hello to rapid development.
- 17:21But wait, there's more.
- 17:23With PyCharm, you get even more advanced features like remote development, database integration,
- 17:28and version control, ensuring your projects stay organized and secure.
- 17:32So whether you're diving into data science or shaping the future of the web, PyCharm is
- 17:36your go-to tool.
- 17:37Join me and try PyCharm today.
- 17:39Just visit talkpython.fm/done-with-pycharm, links in your show notes, and experience the
- 17:47power of PyCharm firsthand for three months free.
- 17:50PyCharm.
- 17:51It's how I get work done.
- 17:53One thing you mentioned earlier is that there's no explicit reactivity that you as a programmer
- 17:58have to write.
- 17:58That's definitely true in the gr.interface case.
- 18:01gr.interface abstracts all that away from you.
- 18:04But Gradio also offers...
- 18:06So this is your simple case.
- 18:07Like, I just want...
- 18:09Just run this function with these inputs and outputs, and I want a real basic variant.
- 18:12Okay?
- 18:12Gradio also offers like a lower-level API where you can explicitly control the layout, right?
- 18:18So right now, everything is like side-by-side.
- 18:19You can put them horizontally across columns, rows.
- 18:23You can add components, right?
- 18:24And then you can also be more explicit in saying, okay, when this input changes, run this function,
- 18:30and then that will populate this and stuff like that.
- 18:33And you can change these things together.
- 18:34So...
- 18:35It makes sense.
- 18:35Maybe it's expensive to...
- 18:37It's expensive to generate some portion.
- 18:39You want to cache it as much as possible.
- 18:41Yeah.
- 18:41You just want to have like more control over like exactly what happens when things change,
- 18:47right?
- 18:47You could...
- 18:48Gradio gives you that control.
- 18:49But for a lot of use cases, you can get...
- 18:52You can get really far with gr.interface.
- 18:53And then the other companion piece, which isn't on the landing page because we just released
- 18:58it maybe two weeks ago, it's gr.chat interface, right?
- 19:01So you could build like a...
- 19:02Oh, interesting.
- 19:02To an LLM or something.
- 19:04Yeah, you could build a chat UI for...
- 19:06Yeah, like an LLM just in one line of code.
- 19:09And I think I can try to maybe find an example of that real quick.
- 19:13Yeah.
- 19:13While you're looking, do you offer any guidance or any opinionated stuff on which LLM to choose?
- 19:19Or do you just say, it's just a chat interface and you write the code to make it happen?
- 19:23You just write the code to...
- 19:25Yeah, just given the message, what should the response be?
- 19:29And then that's the interface.
- 19:30Yeah.
- 19:31And then...
- 19:31There's some interesting options.
- 19:33People might want to pick.
- 19:34Obviously, you could pick OpenAI and use their API, but there's things like private GPT, which
- 19:40allows you to ask questions about your documents, but 100% private, right?
- 19:44You could just give it hundreds of docs and say, learn these and we're going to talk to you
- 19:49about it.
- 19:49Or something along those lines.
- 19:51There's LangChain, right?
- 19:53Yeah.
- 19:54Which is a pretty interesting option for building these things.
- 19:56Llama.
- 19:57Like the new Llama 2.
- 19:58Yeah.
- 19:58The Llama 2.
- 19:59Yeah.
- 20:00So I think in the chat, I just posted like a radio Llama 2 UI that we can show.
- 20:04It's on Hugging Face.
- 20:05So I think we can talk about the hosting on Hugging Face as well.
- 20:08Okay.
- 20:09Yeah.
- 20:09So this is the chat UI.
- 20:11So if you were to scroll down a little bit...
- 20:13UI says chat bot, you can type a message.
- 20:15Yeah.
- 20:15I'll ask it what the podcast says.
- 20:17Hey, I'm here to help you.
- 20:18HugPython is a podcast and community dedicated to helping developers improve their skills,
- 20:22interviews, and experts in the field.
- 20:24That's you, Freddie.
- 20:25Resources.
- 20:26Yeah.
- 20:26What do you want to know?
- 20:27Under the hood, this is using Llama 2, 70 billion.
- 20:30Nice.
- 20:31I can ask you what the latest episode is.
- 20:33So it gives me a sense how far back it goes.
- 20:35That's about two years old.
- 20:36So okay.
- 20:36Interesting.
- 20:37Very good.
- 20:37Yeah.
- 20:37Makes sense.
- 20:38Oh, wait.
- 20:38No, this is...
- 20:40I'm not so sure about that.
- 20:41That's accurate.
- 20:41Yeah.
- 20:42I think there's a little bit of a mismatch, but this is really cool.
- 20:44So you basically plug in whatever LLM you want to into this and they put the...
- 20:50Or you put the Llama 2.
- 20:52If you scroll up a little bit in the website, if you...
- 20:55Like you see those like three bars?
- 20:57Yeah.
- 20:57The hamburger deal.
- 20:58Oh, no.
- 20:59Sorry.
- 20:59That's not it.
- 21:00Other hamburger.
- 21:00Where is it?
- 21:01There are three dots maybe?
- 21:02Oh, I guess maybe because you don't have an account.
- 21:04You can't see the file.
- 21:05Oh, yeah.
- 21:05If you go to files there, if you go to files, I'm going to app.py.
- 21:08This is the source code of the...
- 21:10Oh, interesting.
- 21:11Okay.
- 21:11If you scroll down, the helper text, and then this is the actual prediction function.
- 21:14It's about 20 lines of code.
- 21:16But if you scroll down, you see the chat interface code.
- 21:19With GR blocks as demo?
- 21:21Okay.
- 21:21The tab, a batch.
- 21:22Okay.
- 21:23The important thing is that your chat interface is just like a one-line way to create a chatbot.
- 21:28It works similarly to the interface case.
- 21:30There's just a function.
- 21:31In this case, it's an LLM, so it handles like the responding to each user message.
- 21:36And then you just call that, and then you can call launch, and then you get a UI.
- 21:40Nice.
- 21:41You get like a chatbot-esque UI.
- 21:43And in this case, it's 100 lines of code.
- 21:46But, you know, yeah, pretty simple.
- 21:48That is simple.
- 21:48And one of the things that's pretty cool here is section.
- 21:51You hook it to the type you set up is a streaming type versus the place I type is a batch.
- 21:58And then the function you give it is a generator with yield keyword.
- 22:01So it just, as you go through it, it makes choices and sends them back.
- 22:05Pretty advanced interaction for the UI to be running like that.
- 22:09That's cool.
- 22:09In order to get streaming, there's no special syntax.
- 22:12You can just use the normal Python yield, and then Gradio knows how to feed that iteratively.
- 22:16Feed that to the front end, and then you get like this responsive streaming UI.
- 22:20That's a really good call out.
- 22:21It's just like the, and Gradio tries to use like the core Python syntax and the core Python data types as much as possible.
- 22:28Just to make it easy for people to get up and running.
- 22:30I just blew through this really quickly here.
- 22:32But basically, from what I can tell, is the amount of code here to actually implement this,
- 22:37that is not just the details of giving this text, make the LLM do the thing.
- 22:42Five lines of code.
- 22:43Yeah, definitely true.
- 22:44That should make people pretty excited about, hey, I can write five lines of code,
- 22:48especially with an example to work from.
- 22:49Exactly, yeah.
- 22:50So, yeah, definitely we need to get chat interface up in the landing page.
- 22:53But, yeah, I think it's super easy to get complex demos running.
- 22:57I think it's just a handful of lines of code.
- 22:59We mentioned Shiny a little bit.
- 23:01Boomyar asks, how does it compare to Shiny?
- 23:03How familiar with Shiny can you?
- 23:05I'm not super familiar.
- 23:06I'm ominously not familiar.
- 23:08I'm familiar with Shiny, but not well enough to compare it directly to Gradio either.
- 23:11I mean, they live in the same general world of trying to create a UI that you don't have to write web apps for.
- 23:18But I don't think they're totally the same, but they're similar.
- 23:20Okay.
- 23:21So, we talked about setting up pip install.
- 23:24That's easy.
- 23:24You say you can choose from a variety of interface types.
- 23:27These are the widgets that you're talking about, right?
- 23:29You could, like, in terms of the inputs and the outputs, we call them components.
- 23:33But, yeah, there's...
- 23:34If you go to the docs page, we have about 30-something components.
- 23:37Wow, okay.
- 23:38Yeah, so code, buttons, data frames, plots, files, pretty much, like, you name it.
- 23:44And we're adding components all the time.
- 23:47And we're also...
- 23:48One of the things that we're going to work on is letting the community create their own components.
- 23:51So, if you have your own particular demo, your own particular web app, and you want this new component that we don't support, like, how do you...
- 23:57We're working to make it easy for you to do that without having to merge something into Gradio upstream, right?
- 24:03And then other people can play with it.
- 24:04So, we're working on that as well.
- 24:05But for the time being, it's, yeah, about these, like, 30-something components.
- 24:09And then, yeah, you can mix and match them however you want.
- 24:12You've got quite a bit of them.
- 24:13Many of them, I suspect, people would imagine.
- 24:16So, you've got button.
- 24:17Yeah.
- 24:17Let's see.
- 24:18You've got data frame, which is pretty cool.
- 24:20And then gallery image.
- 24:22The plots.
- 24:23The plots, like the line plot, scatter plot.
- 24:24Those are all pretty cool.
- 24:25But you've also got things like audio.
- 24:27What's the story with audio?
- 24:28This is how you...
- 24:29Yeah, you can upload, like, an MP3 or a WAV file directly.
- 24:33Okay.
- 24:34Maybe for a transcript.
- 24:35Or a sentiment analysis or something?
- 24:37Exactly.
- 24:38Like, whisper.
- 24:39Essentially, audio to transcription.
- 24:41Or also just synthetic audio, right?
- 24:44So, there's, like, Bark.
- 24:45And there's all these, like, machine learning demos.
- 24:47They go text-to-speech, basically.
- 24:49And they're really advanced.
- 24:51So, if you wanted to display that, right?
- 24:52Like, you ingest text, come out with audio.
- 24:55Like, you could use, like, an audio output component.
- 24:58And then you get, yeah, you get, like, a...
- 25:00You can play the audio directly in the browser.
- 25:01It's just like an audio tag in HTML.
- 25:03Obviously, it does more from the UI, I'm sure.
- 25:05But it's to not just...
- 25:07I guess you would just do file if you really wanted to drop it in MP3.
- 25:10But if you wanted to generate audio and let people see the results, then this audio thing
- 25:14would be the way to go.
- 25:16Yeah.
- 25:16And then you could also...
- 25:17The audio could also be, like, the input, right?
- 25:19You could just drag it, drop it, you know.
- 25:20If you click on that box, it'll let you upload an audio if you have it.
- 25:24And then you could...
- 25:25Interesting.
- 25:25You could play it, right?
- 25:26I'm sure I have some audio.
- 25:26Yeah.
- 25:27I know that I have some.
- 25:28But let's see if I can find something to upload here.
- 25:31Here, I'll upload a sponsor.
- 25:32Here, this is super short.
- 25:34So, I can upload.
- 25:35Yeah, look at that.
- 25:36And it just becomes a player.
- 25:37Excellent.
- 25:37You can play it and then you can also edit it as well.
- 25:40So, you see that little pencil?
- 25:41Uh-huh.
- 25:41And you could, like, trim it.
- 25:43You could do, like, trim it to make it shorter.
- 25:45Okay.
- 25:45Yeah.
- 25:46Very nice.
- 25:47Yeah.
- 25:47Yeah.
- 25:47Lots of cool components like that that we have.
- 25:50Yeah.
- 25:50All the standard form stuff, like sliders and drop-downs and, yeah.
- 25:53Highlighted text.
- 25:54And, yeah, so the standard, like, form stuff.
- 25:56But then there's also complex...
- 25:58Not complex, but more maybe domain-specific ML stuff.
- 26:01So, highlighted text, for example.
- 26:03Like, really big and, like, part of speech tagging, like NLP.
- 26:05Right?
- 26:06So, you can get, like, highlighted.
- 26:07It's, like, depending on the tag that you apply to each word in the text, you get, like, different coloring and stuff like that.
- 26:14Yeah.
- 26:14So, it's for MLP, like, Model 3D.
- 26:16So, there's a lot of ML demos that come out that you can generate Model 3D assets directly.
- 26:21So, this lets you display them, as well.
- 26:24So, yeah.
- 26:24So, everywhere...
- 26:25We have everything from the most kind of basic, general, like, web app stuff.
- 26:30Domain-specific machine learning...
- 26:32Yeah.
- 26:32...components as well.
- 26:33Yeah.
- 26:33Let's see what else jumps out here.
- 26:35We have video as well, which is pretty cool.
- 26:38JSON.
- 26:38Yeah.
- 26:39There's a lot of what you can type in.
- 26:40JSON, I guess it probably validates it and auto-formats it, something, rather than just plain text.
- 26:45Yeah.
- 26:46When you return the JSON, it highlights it for you.
- 26:48You can copy it directly as well, so...
- 26:50Okay.
- 26:50So, when we were talking about the Gradio.interface, it had, well, here's an input and here's an output.
- 26:57Floral?
- 26:58So, could you have, if I say, there's a sketch pad and a text box?
- 27:02Yeah.
- 27:02As the input, and then the outputs are, I don't know, three other things?
- 27:06Yeah.
- 27:06Yeah.
- 27:06That's a really good observation.
- 27:07Yeah.
- 27:08So, you can have more than one input, more than one output, for sure, right?
- 27:12So, if you go to the, I think, the time series forecasting demo, I think that one has two inputs, right?
- 27:16That's also on the homepage.
- 27:17Yeah.
- 27:17Also on the homepage, right?
- 27:19So, you can pick...
- 27:20I see.
- 27:21It's like a toy example, like forecasting.
- 27:22If I installs, but you could pick...
- 27:24Here has two inputs, right?
- 27:26Like, the time horizon and the library itself.
- 27:29Both of them are dropdowns, right?
- 27:31And then when either updates, the plot updates, right?
- 27:34So, there's also, like, how you can do plotting in Gradio.
- 27:36And then, also, this is interesting.
- 27:38This demo is built with the lower-level API.
- 27:41You could build it with interface if you wanted to.
- 27:43Just as an example, it's built with the lower-level API.
- 27:47Yeah.
- 27:47So, I guess there's probably a library and time span, two arguments to the function that
- 27:52you write.
- 27:52And then, just as you interact with these widgets, it just recalls it with whatever the values are.
- 27:56Exactly.
- 27:57And then, the function itself returns a plot.
- 27:59So, in this case, it's a plotly plot, right?
- 28:01So, by default, we ship with support for mapplotlib, plotly, bokeh, and altair.
- 28:07So, if I would create, like, a mapplotlib object, do all the stuff to it that I would do in a notebook,
- 28:13instead of calling show, I just return it from my function, and then it becomes part of the UI?
- 28:17Yep.
- 28:17Okay.
- 28:17Yeah, that seems pretty straightforward.
- 28:18Yeah.
- 28:19This one happens to be done with profit, a time series library.
- 28:22Yeah, you've got integration with a bunch of cool machine learning libraries here as well.
- 28:27Yeah, so, the cool thing is, pretty much, if you can write a Python function for it, like, it'll work with Gradio.
- 28:31It really doesn't need to be, like, us as the development team don't really need to build that many integrations
- 28:37to get anything that you're working with to work with Gradio.
- 28:39Pretty much, if you can call a Reddip Python function to do it, and we have supported output types and stuff like that,
- 28:45you can display it with Gradio.
- 28:47Nice.
- 28:47Yeah.
- 28:47So, yeah, there's a couple of demos, for example, like, connecting to, like, databases and stuff.
- 28:52You can connect to S3 if you wanted to, right?
- 28:54Like, you're not...
- 28:55Oh, interesting.
- 28:55I don't know exactly where they are now, but yeah.
- 28:57It's got to be one.
- 28:58Yeah.
- 28:59This looks like it might be one, potentially.
- 29:00Yeah.
- 29:01I'll click, I'll find some S3 stuff.
- 29:03Here's, there's got to be someone here somewhere.
- 29:04Yeah, very cool.
- 29:05So, one of the things people may be wondering, and the fact that I don't see a pricing up at the top,
- 29:11it might be a big hint here.
- 29:12What's the business model?
- 29:14What's the story with this?
- 29:15Is this just straight open source?
- 29:17Is it open core?
- 29:18What's the story around your project here?
- 29:20Gradio is completely open source, and you can host it anywhere, so you're not tied into
- 29:24any platform.
- 29:26Gradio did get acquired by Hugging Face maybe, like, almost two years ago, right?
- 29:30So, Gradio integrates really tightly with the Hugging Face ecosystem, but...
- 29:35Okay, I see.
- 29:36Those integrations are normally free, right?
- 29:39So, for example, you could host Gradio demos on...
- 29:42On Hugging Face spaces or something?
- 29:44Yeah.
- 29:44On Hugging Face spaces, right?
- 29:46And then if your demo needs special, like, hardware or stuff like that, like, you could pay
- 29:50Hugging Face to provision that for you.
- 29:52Sure.
- 29:52But you're not paying for the Gradio.
- 29:54You could use whatever you want on Hugging Face spaces now, right?
- 29:57It doesn't have the Gradio.
- 29:58Yeah, yeah.
- 29:58So it's freely available.
- 29:59So it's completely open source with kind of a Gradio as a service via Hugging Face.
- 30:05Hugging Face.
- 30:06Hugging Face, yeah.
- 30:06Yeah.
- 30:07On their spaces.
- 30:08Say that fast a bunch of times.
- 30:10So, yeah, really cool.
- 30:11One of the things people might not know if they haven't heard of Gradio before is you go to
- 30:15your GitHub repo for it.
- 30:17Almost 21,000 GitHub stars.
- 30:19A serious bit of attention that it's gotten.
- 30:22We've seen a lot of growth in the last, yeah, about year and a half, like, ever since the
- 30:26Hugging Face acquisition.
- 30:27That's really helped us put the library in front of a new audience.
- 30:31Yeah.
- 30:31The recent advances in ML, like, a lot of people want to build demos for ML models now, right?
- 30:36So I think that's definitely helping Gradio as well.
- 30:38Yeah.
- 30:38Trying to give people a sense of scale.
- 30:40This is, like, third of FastAPI, third of Fast.
- 30:43It's, like, that's a lot of people using this.
- 30:45So the reason I'm bringing that up is it's not some brand new thing that you came up with
- 30:49that maybe people could try, but it's got a lot of users, right?
- 30:52Month to month, we're seeing, like, hundreds of thousands of people building these Gradio
- 30:57demos repeatedly.
- 30:58So, yeah, definitely a lot of growth.
- 30:59And, yeah, Gradio is about five years old now, so it's not.
- 31:01Awesome.
- 31:02Congrats.
- 31:02That's really cool.
- 31:03That's nothing new.
- 31:04Yeah, 3.9, almost 4 million monthly downloads.
- 31:07That's a decent chunk.
- 31:08This portion of Talk Python To Me is brought to you by Sentry.
- 31:12You know that Sentry captures the errors that would otherwise go unnoticed.
- 31:16Of course, they have incredible support for basically any Python framework.
- 31:21They have direct integrations with Flask, Django, FastAPI, and even things like AWS Lambda and
- 31:28Celery.
- 31:28But did you know they also have native integrations with mobile app frameworks?
- 31:32Whether you're building an Android or iOS app, or both, you can gain complete visibility
- 31:38into your application's correctness, both on the mobile side and server side.
- 31:43We just completely rewrote Talk Python's mobile apps for taking our courses, and we massively
- 31:49benefited from having Sentry integration right from the start.
- 31:52We used Flutter for our native mobile framework, and with Sentry, it was literally just two lines
- 31:58of code to start capturing errors as soon as they happen.
- 32:01Of course, we don't love errors, but we do love making our users happy.
- 32:05Solving problems as soon as possible with Sentry on the mobile Flutter code and the Python server
- 32:11side code together made understanding error reports a breeze.
- 32:15So whether you're building Python server side apps, or mobile apps, or both, give Sentry a
- 32:21try to get a complete view of your app's correctness.
- 32:25Thank you to Sentry for sponsoring the show and helping us ship more reliable mobile apps
- 32:29to all of you.
- 32:30What do we think about, I don't want to do an imaging one.
- 32:34You can do other demos you've got here, you've got time series forecasting, we talked about that
- 32:38as the multiple inputs.
- 32:40Yeah.
- 32:40XGBoost with explainability.
- 32:43Want to tell us about this a little bit?
- 32:44Yeah.
- 32:45This one also, I think, has like, this one has 12 inputs, right?
- 32:48And the idea is it's one of these like kind of Kaggle-esque things where you like predict
- 32:52income based on a slew of predictors, right?
- 32:55And then the cool thing is that this isn't explicitly built into Gradio, or yeah, this isn't explicitly
- 33:00built into Gradio, but you could hook into SHAP really easily, right?
- 33:03So if you hit explain, it'll try to explain the prediction of the model and display it in a
- 33:08plot for you.
- 33:09Wow.
- 33:09Okay.
- 33:09Right.
- 33:10So for those of you who don't know, SHAP is like this algorithm for explaining the predictions
- 33:14of any machine learning model.
- 33:15I see.
- 33:16It's hooking into XGBoost, right?
- 33:18But there isn't like an explicit, in this demo, there isn't like an explicit Gradio feature
- 33:21that's being used.
- 33:22It's just calling SHAP directly from this Python function and then displaying the results as
- 33:27a plot.
- 33:27The thing it does is it's got a bunch of different sliders and dropdowns.
- 33:30It says given an age, your education level, years of school, whether you're married or not,
- 33:36all those male, female, how many hours a week you work, and then it predicts, what is
- 33:42this?
- 33:42Yeah.
- 33:42Predicts your yearly income.
- 33:44And then the thing you're talking about is with that model, you can ask it, okay, well,
- 33:48of all these different things we could put into it, what features, what aspects of that
- 33:52are more important and what are less important, right?
- 33:54Right.
- 33:55Okay.
- 33:55The use case is like, let's say like you are a data scientist that was charged with building
- 34:00this kind of model.
- 34:01The first question after someone seeing the prediction is someone might have is like, why?
- 34:05Like, why is it predicting this?
- 34:06Right.
- 34:07And then you ideally want to be able to explain exactly what element of the predictors contributed
- 34:12to the prediction the most.
- 34:13And there's a lot of tools that you can use for that.
- 34:15Right.
- 34:16Shab is, I think, the most well-known to my understanding.
- 34:19And then, yeah.
- 34:20And then you can just with Gradio really easily just call that algorithm and then just display
- 34:24it in a plot.
- 34:25Right.
- 34:25And then in this example, like one of the inputs is like the capital gain.
- 34:29So like how much you make on your investments.
- 34:30Right.
- 34:31So, and I think in this particular case, like the capital gain is like really big.
- 34:34Right.
- 34:34So obviously because the capital gain is so big in this particular case, we predict that
- 34:38the income will be really big.
- 34:40Right.
- 34:40Because capital gain is pretty much synonymous with income really.
- 34:43So yeah.
- 34:44Yeah.
- 34:44So that's what this is showing.
- 34:45Yeah.
- 34:46And I suspect this is important for a lot of reasons.
- 34:48If you're building this for your company or for some kind of project, people want to know,
- 34:53well, we have all these different inputs.
- 34:55what ones actually matter to making a prediction.
- 34:57Maybe only the top three are the ones that really matter.
- 35:00And you can throw out things like marital status.
- 35:02Like it actually doesn't make much of a difference.
- 35:04Right.
- 35:04Or if you're a policy person and you're this model actually matches real data, you could
- 35:09say, well, we're trying to improve the policy for a certain group of people.
- 35:13We could focus on any of these aspects, which one or two would make the biggest return for
- 35:18our effort to make a change.
- 35:19Right.
- 35:20There's a lot of cool stuff that comes out of this, I think.
- 35:22And then you as a developer,
- 35:24I think it's like the data scientist.
- 35:27Right.
- 35:27It's really easy to make this kind of thing.
- 35:29Right.
- 35:29This is like a GR.interface, I believe.
- 35:31Right.
- 35:31So this is just one line of code to build this.
- 35:34So yeah, that's OK.
- 35:36Not GR.interfaces.
- 35:37The other API that we can talk about now is called blocks.
- 35:40Yeah.
- 35:40Tell us about that.
- 35:41It's it's cool.
- 35:42Yeah.
- 35:42The way that it works is that you declaratively define your UI.
- 35:46Right.
- 35:46So it's like this input is going to go in this column and say, well, this input is like
- 35:50a dropdown, for example.
- 35:51Right.
- 35:52So in this example, there's lots of dropdown components, lots of sliders for the age and
- 35:56stuff like that.
- 35:57And then you define all these components and then you can define the reactivity separately.
- 36:02So if you were to scroll down, there should be like a button dot click.
- 36:05Right.
- 36:05So whenever the predict button gets clicked.
- 36:07Yeah.
- 36:08So you call this function with these inputs and then return this one thing.
- 36:12Yeah.
- 36:12So that's like the model.
- 36:14Right.
- 36:14Like right now, it looks like a lot of code just because there's a lot of like inputs and
- 36:17stuff.
- 36:18But at the end of the day, it's like pretty simple.
- 36:19You're just defining a UI and then you define like what happens when and then Gradio handles
- 36:24the rest.
- 36:24Yeah.
- 36:24It's pretty straightforward.
- 36:25So people listen.
- 36:26Basically, the UI for the more advanced version is you use context managers, create width blocks.
- 36:32So then you'd say, here's something that goes across and with another row, put some columns
- 36:37in there with another row.
- 36:38And then that's how you build it up.
- 36:40So it's pretty straightforward.
- 36:41What it reminds me of a little bit is it reminds me a little of Flutter.
- 36:44Are you familiar with how Flutter looks?
- 36:47No.
- 36:47And the code it's, I don't know if I can find a quick example.
- 36:50How about an example Flutter?
- 36:52Come on.
- 36:52It's really sort of hierarchical.
- 36:54So that the thing that I think is interesting is the code hierarchy matches the sort of UI hierarchy,
- 37:01right?
- 37:02So it's a code driven UI where as it gets more indented, that talks about, okay, well,
- 37:06that's a row or then you pop off and stuff.
- 37:09And they've got, it's real similar in that sense that all right there in the code, there's
- 37:13not a designer or a markup language or something like that.
- 37:16But yeah, pretty cool.
- 37:17Yeah.
- 37:17So like the UI is all declarative, right?
- 37:20So yeah, like you said, you just say this is this row.
- 37:22And then, yeah, there's ways to control like the relative width of each of these columns,
- 37:26for example.
- 37:27So if you wanted that, you could.
- 37:29And then.
- 37:29Another thing I saw, I can't remember which demo it is, so I'm not going to pull it up,
- 37:32but I saw that there's a way to pass like CSS and styling over as well.
- 37:37Is that right?
- 37:38That was maybe the very first thing.
- 37:39There's a Python API for like defining the theme, right?
- 37:43So like every UI element has certain CSS variables and you can control their value via like the
- 37:48values of this Python class that you then pass to your Gradio instance.
- 37:51But at the same time, there's like a top level CSS parameter that you could do whatever you
- 37:56want in that case.
- 37:56You don't have to use like the Python API.
- 37:58If you don't want to, if there's something different that you want to change, you can change
- 38:02the CSS variables.
- 38:04You're saying I could do something in Python.
- 38:06I could say, well, the style is button order width is three and the color of the borders
- 38:12is blue.
- 38:12But if I just want to have arbitrary CSS, I can just go, here's your arbitrary CSS string.
- 38:17Go with that.
- 38:17You could pass it a file and then it'll, we'll read that file and use that CSS in the demo.
- 38:22Yeah.
- 38:22And then with that, you can also add IDs to each of the UI elements and then you could
- 38:27write your CSS to target the IDs that you add, right?
- 38:30So let's say you only wanted to modify like one button.
- 38:32You could do it that way.
- 38:33Right.
- 38:33You just want to control one of the plots or something.
- 38:35I guess if you're writing arbitrary code to return things like matplotlib plots, do things
- 38:40like the XKCD matplotlib.
- 38:43Oh yeah, for sure.
- 38:44Right?
- 38:44Like you could control.
- 38:45Yeah.
- 38:45Joking, but it's also awesome.
- 38:47There's an XKCD Gradio theme, right?
- 38:50So let me show you this.
- 38:52There is?
- 38:52Yes.
- 38:53Okay.
- 38:53That takes it to another level.
- 38:55That's pretty excellent.
- 38:56That's the cool thing about the theming is that it's shareable, right?
- 38:59So someone built this XKCD theme.
- 39:02Wow.
- 39:02It's amazing.
- 39:03Anyone can use this in their Gradio demo, right?
- 39:05All you have to do is pass theme equals gstaff slash XKCD.
- 39:09And then your demo will look like the XKCD theme.
- 39:12It's so good.
- 39:13I love it.
- 39:13Oh my gosh.
- 39:14This is.
- 39:15Yeah.
- 39:15Completely community driven.
- 39:18Yeah.
- 39:18Well done to whoever did this one.
- 39:19That's really cool.
- 39:20It goes beyond the plot, right?
- 39:21You can for sure return a plot in the XKCD theme, but you could also have the whole demo in the
- 39:26XKCD theme.
- 39:27I often pull this example up, this theme, this XKCD thing for Matplotlib because it's fun.
- 39:32But also I think there's genuine value in putting together something that looks like this.
- 39:37Because if you show this to decision makers, bosses, managers, types, and they see that they look
- 39:44at something that looks like it's working and they're like, oh, well, we're done then.
- 39:47No, we have two months more work.
- 39:49We're not done.
- 39:50But I click the button and it's giving me answers.
- 39:52We're really not done.
- 39:53But it's not scalable.
- 39:55It's not this.
- 39:55It's not that, right?
- 39:56It's only an estimate.
- 39:57Just an XKCD front end on it.
- 39:59You're like, look, you see it's not done.
- 40:00It's just, it's got squiggly lines.
- 40:02It's hand-drawn.
- 40:03It's clearly a prototype.
- 40:04Like, oh yeah, okay.
- 40:05But I could see where this is going.
- 40:06I think actually, psychologically, it may have a big impact, even though it's silly.
- 40:11Yeah, it's a super interesting point.
- 40:12I never thought about it that way.
- 40:13But yeah, I mean, I think it definitely gives it a little bit more sketch vibe.
- 40:16Like this is like in the...
- 40:18Yeah, like a wireframe vibe.
- 40:19Yeah.
- 40:20Yeah, wireframe, like straight from the workshop.
- 40:22Exactly.
- 40:22Yeah.
- 40:23That's what I was thinking because I presented projects to various stakeholders when I used
- 40:27to do that kind of stuff.
- 40:27And they'd be like, oh, well, that looks like it's done.
- 40:30No, we're going to need some time because it's really not done.
- 40:32I know it looks good, but it's not.
- 40:34Yeah, yeah, yeah.
- 40:35You made it look too good, basically.
- 40:36Yeah, exactly.
- 40:37That was a serious mistake.
- 40:39Okay.
- 40:40So we got a little bit more time to talk about a couple of things.
- 40:43I want to talk about how people actually share this.
- 40:45Like we're still talking about a thing I pip install locally and it has a UI, but what do
- 40:49I do?
- 40:50I still don't want to set up a Linux machine and Nginx and domains and all that.
- 40:54So what are the options?
- 40:55But before we get to that, tell us a bit about the internals.
- 40:58Like when you guys work on Gradio and I pip install it, like what's running?
- 41:02What is this project?
- 41:03The backend is a FastAPI server.
- 41:06So what Gradio will do, it'll spin up a server for you.
- 41:09And then that server will serve like the front end assets.
- 41:12The front end is built in Svelte.
- 41:14Interesting.
- 41:14Okay.
- 41:15Basically, whenever you, whenever these reactivity events happen, what that'll happen is that,
- 41:20or what will happen is that the front end will just call the backend API and then run your
- 41:24function and then make sure that all the necessary processing that needs to happen to get your
- 41:28data ready happens.
- 41:29But at the end of the day, it's kind of a simple model in that sense, right?
- 41:33Obviously there's some more complications with like the streaming, for example.
- 41:37That's like a whole kind of different code path almost.
- 41:40But at the end of the day, it's like a REST server that's talking with a JavaScript client.
- 41:46So it's like the standard developer tools story for Python people is it's not, some of it
- 41:53is Python, but you probably end up writing a lot of JavaScript or TypeScript to build this
- 41:57tool for other people.
- 41:58Right.
- 41:58So they don't have to.
- 41:59I'm not a huge Svelte expert.
- 42:01I like, thankfully there's some of the people I work with are like really good at the really
- 42:06knowledgeable and that stuff.
- 42:06And yeah, like the front end code, I think it's, I think there's more Svelte code than
- 42:10Python code.
- 42:11Actually, I'm curious to put the.
- 42:12What's the code breakdown?
- 42:13Let's break it down.
- 42:14Yeah.
- 42:1565% Python, 16% Svelte, 13% TypeScript.
- 42:19Well, so I think the reason might be that we have a lot of like demos and stuff.
- 42:23Yeah.
- 42:23I think there might be some stuff like that.
- 42:24Yeah.
- 42:25The demos are in there.
- 42:26Yeah.
- 42:26There's a lot of demos.
- 42:27You know what feature GitHub needs?
- 42:29As you navigate the source tree, right?
- 42:31When I click on like client or demo or Gradio, it would be awesome if those stats would also
- 42:36be repeated.
- 42:36But just for that section of code, wouldn't that be great?
- 42:38Like how much of the demos are Python?
- 42:40I don't know.
- 42:41Maybe I just want to know that, but that'd be cool.
- 42:42Anyway.
- 42:43Yeah.
- 42:43So I suspect that is, there's probably a lot of code and you've got a lot of notebooks
- 42:47and stuff in there too.
- 42:48That probably puts a big change on it there.
- 42:50A lot of the code is actually, yeah.
- 42:52Yeah.
- 42:52JavaScript Svelte.
- 42:53Right.
- 42:54It's the take one for the team.
- 42:55So the rest of us don't have to write JavaScript.
- 42:57Exactly.
- 42:58Yeah.
- 42:59Cool.
- 42:59Interesting.
- 42:59Very nice.
- 43:00And it says it can be embedded in a notebook, which is interesting, or it can be presented
- 43:06as a webpage.
- 43:07Tell us about this part.
- 43:08If you were to run this on any notebook, like Google Colab, for example, I think this might
- 43:13be an example.
- 43:13Right.
- 43:13So if you call like the way that Gradio works, right?
- 43:16Once you create your Gradio interface or blocks, once you call launch, that's how you start
- 43:21up the server.
- 43:22That's like you kick off the whole process of serving this.
- 43:24That'll create the server locally.
- 43:25Right.
- 43:26So no data is like leaving your machine.
- 43:27Right.
- 43:28And then if you click, if you call launch on like a Jupyter notebook, Colab, SageMaker,
- 43:32like the UI will display like in the notebook.
- 43:34Right.
- 43:34Right.
- 43:35And then you could, if you're doing locally as well, you can go to the local host URL and
- 43:40go to the server that way.
- 43:42And then the really cool thing is that, yeah, there you go.
- 43:44There's a UI.
- 43:45That's what we mean that it's embedded locally.
- 43:47It feels good.
- 43:48Like a little bit like the iWidgets sort of thing.
- 43:51It's similar to that, right?
- 43:53Like it'll display right underneath the cell.
- 43:54Right.
- 43:55And then if you run the cell again, like you'll get like a new, like a new server basically.
- 43:58Right.
- 43:59So you can, you can iteratively build these things.
- 44:01Right.
- 44:01Is it running FastAPI somewhere in the background when you do that?
- 44:03Yeah.
- 44:04Crazy.
- 44:04Yeah.
- 44:05It's pretty, pretty nuts.
- 44:06Turtles all the way down.
- 44:07Yeah.
- 44:07And then what we mean that they can be embedded in a notebook.
- 44:10And then you could also like host it anywhere.
- 44:12Right.
- 44:12So you could, if your machine is exposed to the internet, right?
- 44:16You have a fixed IP address.
- 44:17You could just give people that URL.
- 44:19You could also share it another way.
- 44:21Right.
- 44:21So every radio interface is like a launch method.
- 44:24That's what kicks off the server.
- 44:25And that takes a parameter called share.
- 44:27Right.
- 44:27So if you hit share equals through true, that'll create like a temporary link for 72 hours.
- 44:32So you could share with someone.
- 44:33Right.
- 44:33So you don't have to, you could host it right on your laptop if you wanted to, as long as your
- 44:36laptop.
- 44:37As long as you leave it on.
- 44:38Yeah.
- 44:38Yeah.
- 44:38As long as you leave it on, it's like not sleeping and stuff.
- 44:41Like people can access your, if you go back to that collab notebook, I think we might be
- 44:44able to like demo that.
- 44:45Oh, interesting.
- 44:46If I just say here and say share equals true and rerun it.
- 44:50Equals true.
- 44:50Let's see what we're getting.
- 44:51So you see greater dot live.
- 44:53Right.
- 44:53So if you click that.
- 44:54Totally works.
- 44:55Yeah.
- 44:55You can select that to whoever you want and they can just use this.
- 44:58Right.
- 44:58So that, yeah.
- 44:59No install needed.
- 45:01Right.
- 45:01If you're sharing this with your collaborator, your PM, your manager, your friend or whatever,
- 45:06you could just give them this link.
- 45:08Right.
- 45:08So you don't have to do anything.
- 45:10I guess it's probably worth emphasizing.
- 45:12You should never try to host like production.
- 45:15So over this, it sounds like, cause it's only for a limited time and it's gonna, it's just
- 45:19a GUI looking URL.
- 45:20But so often you'll be in meetings over zoom or something else.
- 45:25And they'll be like, Hey, what have you done?
- 45:26Can you show me?
- 45:27And then you're like, all right, well, let me do screen sharing.
- 45:28Oh, I don't have, I'm not a host.
- 45:30Can you make me a host now?
- 45:31Can I, you're sharing, can I share?
- 45:33And then finally you get it up and it's blocky and they're like, Oh, zoom in.
- 45:36It's too small.
- 45:37I'm on my phone.
- 45:38This way you just take that and you give it to them in the meeting.
- 45:40Right.
- 45:41And they, they have a full fidelity thing they can play with, which is awesome.
- 45:44They have the demo itself that's running on your machine.
- 45:46Right.
- 45:46So they don't have to.
- 45:47Yeah.
- 45:48Yeah.
- 45:48Yeah.
- 45:48Like no, you don't have to install anything.
- 45:50Right.
- 45:50Just go to your point, your browser at this URL.
- 45:53And yeah, it'll work for that quick demo.
- 45:54Yeah, exactly.
- 45:55Use case as well.
- 45:56Yeah.
- 45:56Definitely don't use it for production.
- 45:58Yeah.
- 45:58If you wanted to use reproduction, I think like the easiest, the absolutely easiest way to use
- 46:03hugging face spaces.
- 46:04So if you go to hugging face spaces, it's basically like a drag and drop, right?
- 46:07Like all you have to do is just drag your radio script into like their UI and then that'll
- 46:12upload it.
- 46:13And then radio will already be installed and then the server will, will start.
- 46:17And then you have, you have your permanent hosting.
- 46:19And then it's also like a, it has like a Git interface, right?
- 46:21So like your demo has several files, like directory.
- 46:24There's some assets, some images that you need that you want to upload as well.
- 46:27Like you could just git pushed to your hugging face space and then you'll, you can do it like
- 46:32that as well.
- 46:33Okay.
- 46:33So you add it as an origin or something and then just push to it.
- 46:36Yeah.
- 46:36I could try to show it.
- 46:37I don't know if you can have a, can I share my screen?
- 46:40I wonder.
- 46:40Yeah, sure.
- 46:41Click at the bottom and share.
- 46:42It's easier if you share an app.
- 46:44Yeah.
- 46:45If I go to my hugging face account and go here and then new space, and then this is
- 46:50talk Python demo, then MIT.
- 46:54Oh yeah.
- 46:55We can do whatever we want with this.
- 46:57Right.
- 46:57So you could, right.
- 46:57You could host stream, like radio, Docker.
- 47:00Yeah.
- 47:01Anything you want.
- 47:02Right.
- 47:02So for free, very generous free tier, you have two CPUs.
- 47:06That is a generous free tier.
- 47:07Two CPU, 16 gigs.
- 47:09Yeah, that is good.
- 47:09The only caveat is that this will go to sleep after 72 hours if no one uses it.
- 47:14Right.
- 47:14So, but you could also upgrade.
- 47:16You have a machine learning model, you need a GPU, you pay for the GPU per hour.
- 47:19And then yeah, you can set public or private and then you just create space.
- 47:22And then yeah, this is how the Git interface works.
- 47:25Right.
- 47:26So you could just git clone this and then add your code and then just git pushed.
- 47:31Or you could just copy this.
- 47:32Chop, copy the code and just paste it into a file.
- 47:35Yeah.
- 47:35Add file, create new file.
- 47:36It does feel a very Git, right?
- 47:38Even has the similar look and feel of like when you go to Git and you say add new file.
- 47:42Yeah.
- 47:43True.
- 47:43A perfect commit message.
- 47:45No, no comment.
- 47:46Just blank.
- 47:47I love it.
- 47:48Yeah.
- 47:49And then.
- 47:49So over here, they run in Docker containers or Kubernetes or something like that.
- 47:53The Docker container.
- 47:54So what this is doing, it's that it's, it has like a pre-configured Gradio Docker image,
- 47:59right?
- 47:59That comes with, there we go.
- 48:01It already built.
- 48:01But it comes with Gradio and like a bunch of standard like data science libraries.
- 48:06And then you write them in.
- 48:08It'll, and then it adds your code to the container and then it starts a container.
- 48:11Right.
- 48:11But you could also just use your own Docker file if you wanted to.
- 48:14Okay.
- 48:15You could host whatever you want.
- 48:16Right.
- 48:16So here.
- 48:17Yeah.
- 48:17You got to put your name in a present.
- 48:18Wow.
- 48:19Look at that.
- 48:19Hello, Michael.
- 48:20Yeah.
- 48:20In the time that we've been talking about this, you've created a space and created a
- 48:24new UI and hosted it.
- 48:25That's pretty ridiculous.
- 48:27Yeah.
- 48:27And then you could just share this.
- 48:29Share the URL or whatever.
- 48:30Yeah.
- 48:31Yeah.
- 48:31You can just share the URL there.
- 48:32And then they have like a machine learning app that they can share to be used with, with,
- 48:36they can share with anyone and it'll stay up.
- 48:38It's just Git, right?
- 48:39So if you have Git locally, if you know how to use Git, you can very seamlessly use, push
- 48:44to the Hugging Face platform.
- 48:45There's no special magic.
- 48:46What if I'm not a hugger?
- 48:47What if I, for some reason, don't want to use Hugging Face, can I post this behind Nginx
- 48:52or somewhere if I like infrastructure, or I'd like to do my infrastructure as a service?
- 48:57Just that app.py file.
- 48:58Python.app.py from your cloud.
- 49:01And then just make sure that the URL is, the port is accessible for the internet.
- 49:05And then you just give that to everyone.
- 49:06Or front that with Nginx and put some.
- 49:08Yeah, exactly.
- 49:09Let's encrypt and then just point it over to that URL and let it go.
- 49:12It'd be pretty straightforward.
- 49:13You could host it wherever you want.
- 49:14It's just, it's all open source tech under the hood, right?
- 49:16It's just FastAPI built and then some Python libraries, right?
- 49:19There's no, there's no lock in anywhere, right?
- 49:21Yeah, cool.
- 49:22So it's probably running uvicorn, I would guess, as the server, which is production-ish.
- 49:28I guess if you did like really large scale, you might want to do Gunicorn with the uvicorn
- 49:33workers or other than just uvicorn itself, but you know, for the failover and whatnot.
- 49:37But that sounds like, if these words sound familiar to you, it should sound really familiar.
- 49:41If they don't, then don't worry about it.
- 49:43Exactly.
- 49:43That's the standard Python web infrastructure stack type of stuff.
- 49:47Right.
- 49:47And in that model, it's completely free, right?
- 49:49It's open source.
- 49:50I can do, I can just run it there, right?
- 49:51Yeah.
- 49:51Just run it wherever you want.
- 49:53Very nice.
- 49:53Well, Freddie, let's wrap up our conversation, get a little short on time with just where
- 49:58things are going.
- 49:58We'll talk about where we are, where it came from, where are we going?
- 50:01Thanks for that.
- 50:01So I think where we are, so I think we're trying to get Gradio into like as many platforms as
- 50:08possible, right?
- 50:09So, and like as many kind of like deployment modes as possible.
- 50:12So one of the cool projects that we're working on is Gradio Wasm, right?
- 50:16So like running Gradio entirely in the browser.
- 50:18Wow.
- 50:19Okay.
- 50:19So yeah, so that's, it's not ready, it's not released yet, but it's something that we're
- 50:24actively working on, right?
- 50:25So you can, yeah, so if you want to just build your machine learning demo, running everything
- 50:30directly in the browser, right?
- 50:31There's like the ML for the web space is growing a lot.
- 50:34It's advancing really quickly.
- 50:35Like we're getting ready.
- 50:36We're getting ready for that.
- 50:38So what's that look like in terms of foundations?
- 50:40Is that Iodide?
- 50:42Is that PyScript?
- 50:43Is that something else?
- 50:44It's using Pyodide right now.
- 50:46Okay.
- 50:46Yeah.
- 50:47So yeah, that's how.
- 50:49Yeah.
- 50:49That's a pretty good choice because one of the selling points of Pyodide, not just that
- 50:53it has Python in the browser, but that it has the ability, it has a bunch of the machine
- 50:57learning libraries either available or compiled over to Wasm WebAssembly.
- 51:02And so you can actually do machine learning stuff, not just like, hi, my name is plus name.
- 51:07You know what I mean?
- 51:07That's one of the cool projects we're working on this year.
- 51:09The other cool project that we're working on is, yeah, like the custom components, right?
- 51:13So let's say that you wanted to build your own custom machine learning demo, your own custom
- 51:17web app, right?
- 51:18But you need something that we don't have.
- 51:20Giving you the API to build that component locally and then just hook it into the app without
- 51:24having to like merge anything into Gradio upstream.
- 51:27We're working on that actively.
- 51:28So that'll be really exciting.
- 51:30And then, yeah, really excited just because it'll enable like a lot of people like in the
- 51:35creative community to collaborate with each other and build like really impressive stuff.
- 51:38Yeah.
- 51:39Kind of like on their own, right?
- 51:40Like they don't need like, they don't need like the core development team necessarily.
- 51:43Sure.
- 51:44Like pytest plugins rather than trying to change pytest.
- 51:46So that, yeah, really excited about that.
- 51:48And then, yeah, the other cool stuff is that we're, one thing that we didn't talk about that
- 51:53I would want to talk about if we have time is that all these demos that we've built
- 51:57are sort of available via API, right?
- 52:00So if you click on any of these demos, like if you click on that first one, if you scroll
- 52:03to the bottom and you see it says use via API, right?
- 52:06So this gives you like a little code snippet as to how you can call this demo from Python
- 52:11or JavaScript.
- 52:11Okay.
- 52:12What does that mean, right?
- 52:13That means that basically all these ML apps that are available on Huggy Face or just anywhere
- 52:16on the internet, like they now become like building blocks that you can use in your
- 52:20own workflow, right?
- 52:21So, and actually this demo itself, I'm familiar with it.
- 52:25It's actually really cool because it's calling two other Gradio demos via API, right?
- 52:29So this is an example of someone building their Gradio app by calling other Gradio apps.
- 52:33Wow.
- 52:33Okay.
- 52:34We're creating this ecosystem where...
- 52:36It's like Gradio microservices.
- 52:38Exactly.
- 52:38Right.
- 52:38So it's like all these Gradio apps are building blocks that you can then connect together via
- 52:43API.
- 52:43And that's really cool, right?
- 52:45Because like it basically means that machine learning is available.
- 52:48Like you don't need to use a GUI to get state-of-the-art machine learning, right?
- 52:53You could like use an API and that means that you could put these models like pretty much
- 52:57anywhere, right?
- 52:57So like one of the cool things that we launched two weeks ago, I believe, or like a week and
- 53:01a half ago is that you can deploy like a Gradio chatbot to Discord, like just one line of code,
- 53:06right?
- 53:06So if you, let's say if you have a Gradio app that talks with OpenAI, like GPT-3 or Llama
- 53:13or any of these like open source LLMs, if you can build a Gradio app for it, you can like
- 53:18seamlessly hook it into your Discord server, right?
- 53:20So that's all built via this like API functionality, right?
- 53:24So this is something like, I'm personally like super excited about it.
- 53:27Like we want to push this further just because it's like Gradios that you like Gradio historically
- 53:32has been built for the UI, but it can also be used to get these machine learning models into
- 53:36more places.
- 53:37One of the things that I'm really excited about in the coming years, making this a little
- 53:40bit more, a little bit more visible and getting.
- 53:42Yeah.
- 53:42You could integrate some really cool LLMs and other types of chat into your Discord.
- 53:48I imagine you could probably do it with a Slack as well.
- 53:50And if somebody asks in your company, how do I, whatever you could think of go, Hey,
- 53:55I've already, I'm private GPT.
- 53:58I've already ingested all of our docs.
- 53:59You want me to take a shot at answering that?
- 54:01Like, sure.
- 54:02Why not?
- 54:02That's one of the pet projects I want to do is just do that for the Gradio Discord,
- 54:06right?
- 54:07So there's like a Gradio Discord where you could chat with the Gradio community and there's
- 54:10like people ask questions in it, but it'd be really cool if we had a Gradio chat bot that
- 54:14like knew a lot about Gradio that then you could just ask.
- 54:16Exactly.
- 54:17Chatbot slash Gradio chat.
- 54:19Like, like how do I, whatever, how do I display a plot?
- 54:22Right.
- 54:23And then it'll tell you, just return a matplotlib from your function.
- 54:26People could think, well, why don't I just use ChatGPT or something?
- 54:28But these are the things you teach it like deeply about, you give it all the docs and you
- 54:32say, study this.
- 54:34And then I want to ask you about it.
- 54:35Right.
- 54:36And a lot of times the docs and other things go beyond the token level that the standard
- 54:40models can take.
- 54:41Like I've tried to get ChatGPT to tell me about transcripts on Talk Python and it can't even
- 54:46adjust like one transcript before it runs out of space.
- 54:49Like I can't quite load all that.
- 54:51Well, that's, I wanted to ask you about all of them.
- 54:52You can't even do one.
- 54:53So this is not working for me.
- 54:55Yeah.
- 54:55So you could fine tune like an open source LLM and then host it wherever you want.
- 54:58Right.
- 54:58So.
- 54:58Yes, exactly.
- 54:59More control.
- 55:00Yeah.
- 55:00That's cool.
- 55:00So you could teach all about Gradio.
- 55:02Real quick question.
- 55:03Mr.
- 55:03Magnetic in the audience asks, what about a hugging face desktop app instead of the browser app?
- 55:07Yeah.
- 55:08So that's something that there's an open issue for that.
- 55:10It's something that we've been kicking around as well.
- 55:13It's just like, how do we get like a Gradio desktop app as well?
- 55:16So yes, stay tuned.
- 55:18I think let me try to find that issue and then comment on the YouTube.
- 55:21But yeah, I would love your thoughts on that.
- 55:22If anyone has thoughts on that.
- 55:24But yeah, we, it's something we're thinking about.
- 55:26It's not, I don't think it'll happen maybe in the next like month or two, but maybe before
- 55:29the end of the year or next year, it could happen.
- 55:31Excellent.
- 55:31All right.
- 55:32Well, I think that pretty well covers it.
- 55:35It's a super exciting project.
- 55:36So good luck with it.
- 55:37I mean, already you've had a lot of luck with it.
- 55:39So you don't need my wishes, but further good luck on that.
- 55:42And yeah, before we get out of here, let me ask you a final question here.
- 55:46If you're always asked, like to ask the guests or like some cool IPI project they've run across.
- 55:50It's been really awesome.
- 55:51Maybe not super popular, but has made a difference or you've, wow.
- 55:54How did I not know about this?
- 55:56Any come to mind for you?
- 55:57Python project?
- 55:57Yeah.
- 55:58Something I can pip install like FastAPI, but not FastAPI.
- 56:01Cause everyone knows that.
- 56:02I think when I was just starting out, I think I was like a really big noob and like I always
- 56:07ran into like environment issues.
- 56:09And then a friend of mine showed me about like pip depth tree.
- 56:12It shows you exactly like why things get installed.
- 56:15And that's a good one.
- 56:16Yeah.
- 56:16I think it's really, I think it's really magical, honestly.
- 56:18Yeah.
- 56:19I think it's really helpful just to like figure out like, especially like when someone files
- 56:23an issue and like they, we don't know what's wrong with them.
- 56:26Like sometimes I'll just like, where did this thing even come from?
- 56:28And then just use like pip depth tree.
- 56:30I think that's, it's really cool.
- 56:31And it's like really simple.
- 56:32But yeah, I think it definitely has saved me a couple hours of time.
- 56:35So.
- 56:35It's cool.
- 56:36I've used it for my own stuff.
- 56:37I hadn't thought about using it for tech support, but yeah, of course, because then
- 56:41people run into problems because their environments are screwed up and they say they have a thing
- 56:44or they don't, or they say they have a version of a thing, but they don't.
- 56:47And with this, you can just say, run this one command and it'll give you like a really
- 56:50cool, they have all these things installed and this is installed because it's required.
- 56:54Yeah, exactly.
- 56:55It's really nice.
- 56:56Yeah.
- 56:56Cool.
- 56:57Excellent recommendation.
- 56:58All right.
- 56:58Final call to action.
- 56:59People want to get started with Gradio.
- 57:01What do you tell them?
- 57:02Hit install Gradio and then go to gradioapp.com and then get see the demos there.
- 57:07In our website, there's a link to our discord server.
- 57:09So yeah, join the discord and say hi.
- 57:12And then yeah, there's lots of people there.
- 57:13We're willing to help.
- 57:14And then yeah, never hesitate to file an issue.
- 57:17What's really cool about this is like seeing that the demos that people build and like
- 57:20people build stuff that I frankly push the limits of what I thought people could build
- 57:24with Gradio.
- 57:25And it's really cool seeing that.
- 57:26Yeah, that's awesome.
- 57:27Don't be afraid to, or don't hesitate to build really cool stuff with Gradio and think, well,
- 57:31we're really good about amplifying that.
- 57:32So if you have something really cool, just like tag the Gradio Twitter account or reach
- 57:37out to us on discord or something.
- 57:38We'll amplify it for you.
- 57:39Cool.
- 57:39Well, excellent project.
- 57:41And thank you for being on the show.
- 57:43Thank you for having me, Michael.
- 57:44I had a lot of fun.
- 57:44Yeah, same.
- 57:46This has been another episode of Talk Python To Me.
- 57:49Thank you to our sponsors.
- 57:51Be sure to check out what they're offering.
- 57:52It really helps support the show.
- 57:54The folks over at JetBrains encourage you to get work done with PyCharm.
- 57:59PyCharm Professional understands complex projects across multiple languages and technologies.
- 58:05So you can stay productive while you're writing Python code and other code like HTML or SQL.
- 58:10Download your free trial at talkpython.fm/done with PyCharm.
- 58:15Take some stress out of your life.
- 58:18Get notified immediately about errors and performance issues in your web or mobile applications with
- 58:23Sentry.
- 58:23Just visit talkpython.fm/sentry and get started for free.
- 58:29And be sure to use the promo code talkpython, all one word.
- 58:32Want to level up your Python?
- 58:34We have one of the largest catalogs of Python video courses over at Talk Python.
- 58:38Our content ranges from true beginners to deeply advanced topics like memory and async.
- 58:43And best of all, there's not a subscription in sight.
- 58:46Check it out for yourself at training.talkpython.fm.
- 58:49Be sure to subscribe to the show, open your favorite podcast app, and search for Python.
- 58:53We should be right at the top.
- 58:55You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 59:00and the direct RSS feed at /rss on talkpython.fm.
- 59:04We're live streaming most of our recordings these days.
- 59:07If you want to be part of the show and have your comments featured on the air,
- 59:11be sure to subscribe to our YouTube channel at talkpython.fm/youtube.
- 59:15This is your host, Michael Kennedy.
- 59:17Thanks so much for listening.
- 59:18I really appreciate it.
- 59:19Now get out there and write some Python code.
- 59:21music
- 59:27music
- 59:33music
- 59:36music
- 59:37music
- 59:39music
- 59:40Thank you.
- 59:41Thank you.