And welcome to week two, day two, as we continue our adventure into the realm of LMS.
Uh, so today, a very special day that I'm really looking forward to.
Uh, quick recap.
Of course, you can now describe Transformers as well, and you can talk about six top frontier models.
You can confidently use OpenAI's API along with Anthropic and Google's.
But today, changing topic, we are going to be talking about Gradio.
And I realized I have gone on about Gradio a bit, but you're going to see why.
It's really terrific and we're going to have fun with it.
We're going to create a simple UI using radio and then hook it up to Frontier Models.
And as I say, it's going to be easy.
Uh, so why make such a fuss about user interfaces?
Because it allows us, as data scientists, as LM engineers, to do more quickly, to be able to build
prototypes, expose them to our audience, to our business sponsors, the the, the people that need
our LMS and do so very quickly indeed.
If you are a front end person or you've dabbled in front end and you know what it's like to stand up
a react app or something like that, you know that there's a lot of boilerplate code that goes into
getting things up and running, and it turns out that we don't need to do that with models.
We can build a user interface super quickly, and that's what we'll be doing today.
So Gradio is in fact, uh, a part of Hugging Face.
It was a startup that was acquired by Hugging Face a couple of years ago.
So Gradio is part of the Hugging Face family.
Uh, and as it says on the landing page there, it lets you build and share delightful machine learning
apps.
And I think you will be delighted by it.
Uh, so I promised you it was easy.
It really is easy, as you will see.
What it comes down to is there is this magical line import Gradio as GR, which is the way people do
it.
You write a function, any function, a function to do a task.
In this case, the function that they've written here is greet takes a name and it replies hello name.
And then you can create a user interface based on that function, give it inputs and outputs, and you're
going to get a user interface built for you just like that.
And that is what we're going to do.
So what we're going to do now is create a UI for API calls to GPT and Claude and Gemini, so that you
can see how to expose this.
We are then going to go ahead and create a UI for the brochure that we built in the last week's lectures.
And so that's going to allow us to really package up our application into a nice business app with prototype
screens.
And of course, we'll throw into the mix streaming and markdown into a UI, since we're pretty good
with that already, that's going to be the plan.
Let's go over to the lab and get on with it.