 So, today we're going to take a look about a Python library called IPyregits, and it's great for us to work with interactive interfaces on Jupyter notebooks, and a little bit about the agenda of today. First of all, why IPyregits? We saw the previous talk about streamlit and why streamlit and not IPyregits. A little bit about the 101 of using the library, and I use the case for IPyregits by using it. I'll give you a real example. So, hi, I'm Deborah. I live in Recife in Brazil. It's in the coast, as you said, and it's like a 3-hour flight from Rio or Sao Paulo. I have a bachelor's degree in computer science. I'm currently a lead data scientist at Entity Data. I'm very active. We work thinking all the time, so I like doing things with my body, so I like pilates. We're skating, dancing. My friend joked that pilates is for old people, but I like it. I also like music very much, especially music with groovy bass lines. I also play the bass. Yeah, that's it. Let's go ahead. First, why IPyregits? So, if you just want to showcase your model, so your users can play with it, like we saw in the previous talk, go with streamlit or with plotlit-dash if you want to create a dashboard. But instead, if you need a user interface to annotate data, for example, which would be our user case, or if you want to quickly prototype a new user interface, and if you like me and you hate front-end development, then go with IPyregits and we will see why. First, it's easy to work with for us data scientists because it's Python, so we use Python all the time. It's on Jupyter notebooks, so we don't have to think about the deployment. This is a use case mostly for internal purpose tools, because we don't have a user base, we just want to share it with our team. And we also have a wide range of built-in widgets. Sorry, my Portuguese. And yeah, so a little bit about the 101 of the library. So, I don't know if everybody here is familiar with Jupyter, but it's like our interface. We use a web browser, and we write code, and we can play the cell, and it runs the code. Here's an example, and this is an example. I'm printing something, and if I want to change the output, I need to run the cell again. So this is my content, then I change the text for it to change. I actually need to run the code. And the first widget we will learn is the output widget in which we can capture and display the output generated by Python, and so what does this mean? We can create an output widget, display it somewhere in the notebook, then change it somewhere in another cell, and the output will automatically update. Here I'm imparting the library, and then I'm creating the output widget. And on the third cell, I'm displaying the content of the output. And the cell before that, I'm writing, this is nice. And then on the cell after that, I'm painting a text to the output, and it automatically displays the content, you see? Like in the previous cell, I'm running a code on another cell, and it's updating. And I can also clear everything like I did there, and it will also clear. So this is the main widget of IPyWidgets, which is the basics. Like, I want to change the code somewhere, but I want to update it just there. And yeah, another function, which is actually the easiest way to use IPyWidgets is the interact function, which automatically creates UI controls for us based on function parameters. It's beautiful. It's the easier way to use IPyWidgets. So I'm using it as a decorator. I have a function there that the parameter eats a value from 0 to 10, like a tuple. And tuple, do you say like that? OK. And then you can display, I'm displaying the value. And with the decorator, the library actually saw that this was my parameter, and it provided us with a slider, which is beautiful. If we had a list, it would provide us with a dropdown. And that's all. And this is the easiest way to use IPyWidgets. Let me check the time. Now we will take a look at the full example. Now using another interactive widget, which is a toggle button, we will use the observe method of this button to, OK, I want to check when this changes, and I want to do something. We will also use the VBox widget, which is to display content in the screen. And the output widget that we talked before to update the changes. Here I have a pointer. Here I have the toggle button, like the options are. I got some data set, and I got the Pokemon data set. And I have options like flower, sea lion, or shellfish, Pokemons. And here I have the callback function. So I'm using a pandas data frame, and I'm filtering by those options. And we have the toggle button callback. And to do something when it changes, we use the observe method of this widget. And we passed the function we created. And finally, we display it. I'm using the VBox widget here, which I want to display the toggle button. And above that, the data frame itself. So when I click on each button, the filter is applied there. And it changes. This is a use case of most of everything that iPie widgets can offer us. But to be honest, if you want to do that, go with Streamlit. It's easier. This is just for us to understand what we can do it, what we can do it. But it's not the best use case. What is then the best use case? For a real world example, we will now see an example of our use case, which was an internal tool to monitor object detection models in production. And I don't know if you guys work with models in production, but it's very hard to find out of the box tools to monitor data drift or something like that. If you work with image data, for tabular data, we have some solutions. But for image data, it's something new. We don't have a lot of options yet. And we have a model, a lot of models in production. And we want to quickly figure out if an object class is being predicted incorrectly. And what is the object detection problem scenario there? We have a lot of classes. It's actually a product zone shelves model, model to detect product zone shelves. So we have a lot of classes. And we have many classes per image, kind of 10, usually. And it's hard for a human to find mistakes if looking for the whole picture, because we have a lot of classes. And yeah, a lot of things going on. And what was the solution? OK, let's write something quick and dirty to check faster if there's a class that is being predicted incorrectly. So we get a random sample of production images. We crop the images so we can display only the crops of this image, not the whole image. And we select each class for review and marking the objects that maybe need further analysis or are wrong. And this way, we can direct the task so it's easier for we humans to do it. So as a demo, we cannot use the production data. So I got the Coco data set, the 2017 random validation instances. I don't know if you guys are familiar with object detection, but this Coco is like a famous object detection format. We have the images, and we have metadata about those images, like the objects. And to build a tool, we create the crops using OpenCV. Like the metadata have the coordinates for the objects, so we can crop them. And we use basically those four widgets. This is the image widgets from iPie widgets, which is for displaying images. The checkbox, which is a checkbox. And the H box and the V box, they are basically for creating the interface, like the grids and display the content. And a button, which is a button. And sorry, let me get some water here. This is the demo. So there, I'm using the dropdown widget, where we can select the classes. And this is a sample, for example, for the car class, we have a tire there. And I don't know, maybe it's a mistake, or if these were really a production data set. So with this interface, we can quickly check the data and quickly annotate it much faster than getting the whole image and annotating like we would do for training. And yeah, that's an example. This will be much harder to do with extremely tord-dash. Not harder, but less straightforward. Here we have everything we need, like we use Python. We don't need to care about the deployment. We can display widgets and format the interface like we want. And yeah, this is a use case for API widgets. We've built at the interface checking all of the requirements, like something quick, and the users could explore the data. We didn't need it to touch in HTML or CSS, which is great for us data scientists. We don't need to care about the deployment. Again, this is a tool for internal purpose, so we don't need to care about the deployment. And it was easier to do than if we were using string width or dash. And yeah, and that's it. Like, API widgets can save us a lot of time with prototyping or building internal tools, because usually, we data scientists don't have the front-ended knowledge. We can do this without HTML or CSS. And it's all inductor. So we don't need to care about deployment. And that's it. I think that was quick. And that's it. Thank you very much. Great, I was. So everyone has understood everything, or none of it? But yeah. We'll have a demo. Congrats for Yoshiro for writing, doing a live coding without any typo. It was really impressive. Firstly, thank you for the presentation. The people that are using this to test the software is the QA engineers or the developers used to test them. Yeah, good question. Like, we have a team with new data scientists. So they are kind of both QA and developers themselves. But yeah, we have a mixed team. So we don't have a QA team specifically doing that, working with that. So everyone uses it. How easy or difficult would it be to customize and extend widgets to build new widgets? Oh, it's easier. I didn't do it. But in the documentation, there's a guide for working with it for doing that. But to do that, you need to work with HTML and C-access. Oh, yeah, yeah. But they have this functionality. Like, you can extend and create new widgets. Thank you for the presentation. Thank you. Sure. Be gentle. First of all, thank you for your presentation. You mentioned earlier that you don't have to worry about deployments. But do you have any specific best practices about this part? Or do you, when you work on something critical, do you follow something specifically? Yeah, I don't have for my luck. I'm lucky that I don't need to work with deployments. Like, everything we do is internal. So I don't have much experience with the best practices for our deployment. I know that there's another library, like Voila. And it's for using Jupyter without the code. It's like kind of creating the interface without the Jupyter look. That might be a good way to go. But I don't know anything about deployments or any new best practices. I'm sure you're interested in how people are deployed. OK. Oh, yeah. Thank you, guys.