From the course: Build with AI: Advanced Production-Ready Gradio Applications

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Logging, monitoring, and error tracking

Logging, monitoring, and error tracking

- [Instructor] Many times when you build your apps, you expect that everything will work completely fine, but sometime you get an errors. Now whenever you get an error, you need two things. First you need a proper logs. Second, you need some way of handling those errors. Let's just see how we can do that into our Gradio app. For an instance, let's just take a simple example. Here, I'm just building a division app where I have a numerator and denominator, and whatever I do in this division, I will just see the results. Let me copy-paste the function, and let me launch this app. Now our division app is ready, where I can just divide, let's say, if I want to divide 10 by 5, I'll get the output as 2 correctly, but imagine that I did some mistake and I say that let's divide 10 by 0. Now wherever you try to divide by 0, it's an error, because that is not a valid number. Now, if I run this, I see an output as an error. I don't want to create these kind of an error into my app. I want it to…

Contents