But wait, there's more.
We need to add some more to the user interface just to make it look more cool.
And so I put a little bit more work into this, and it's not particularly worth going through the code
in that much detail other than to really show you what, what I came up with.
But it occurred to me that whilst it is satisfactory to see the log messages appearing so you can watch
to see what's going on, it will be much nicer if we could surface them to the user interface.
And that's a bit harder because typically the user interface with Gradio, it's a matter of making a
request and getting back a response, but it's perfectly doable.
And so whilst it's not necessarily worth us going through exactly how I approached it, but the I've
now turned to a new, uh, um, file, a new module called prices.
Right.
Final dot pi and in the Price is Right final.
I've added in some stuff at the top to handle being able to subscribe to long log messages.
Um, and then I've thrown in just a little bit of extra stuff as well.
So with that in mind, let's just create a new terminal window and have a look at this user interface
now.
So we can say um, Python price.
Oh sorry I need to activate my conda environment.
Obviously conda activate LMS.
And now now we can say python price is right final.py.
And we can see what comes up.
Uh so again it thinks for a little while.
Up it comes.
And you're going to notice 1 or 2 changes here.
Uh, so first of all, uh, as I promised, we've got this very attractive looking, uh, log here that
shows you what's going on and allows you to look across the different, uh, agents as they run, see
who is doing what.
Uh, as before, we have our table up here, and that's going to allow us.
I just clicked on that and I saw out of the corner of my eye that of course I got a push notification
right away.
Uh, and what do we have here?
Well, what we have here is a 3D representation of our chroma database that's being used to look up
the products to send to the frontier model when it appears over here.
Uh, now, I know what you're thinking.
You're thinking, okay, but what's the business purpose of having this particular rag knowledge store
being surfaced on this user interface?
Uh, and it's an important question and an important answer.
Um, is that there's no purpose whatsoever.
No purpose to having this diagram.
It just looks great.
And I want it to.
And it's my course.
And so I'll do it if I want to.
Uh, so yeah, I mean, in all seriousness there, uh, it was nice to be able to surface some data
and be able to illustrate how easy it is to get a plot to show on a Gradio user interface.
Um, but, uh, this this is running, uh, just, uh, in to show off.
What would perhaps be useful over time is to show in this the memory and actually be able to show in
vector format the different points on the memory, and you can hover over it and see it.
So maybe I'll make that adjustment myself, but or you could do it for me and push the code that would
make this a little bit more useful and less of a gratuitous change.
Now, the other thing that you might have noticed while I've been speaking is that the memory suddenly
went blank, and you may be wondering why on earth did the memory go blank?
And the reason the memory went blank is, of course, because the run has kicked off over here.
And actually, again, there are ways around this, but right now, when the run is in progress, that
table goes blank and then it will repopulate when the run completes, which is a bit janky and can be
fixed.
And that could be an exercise for you to improve the UI.
Um, but you can see right now it's got to the point where it's calling modal.
And so modal will be warming up.
So with that, because this will take a minute, I will pause and I will come back when it has completed.
See you then.