Building LLM Applications w/Gradio
Freddy, a software engineer at Hugging Face, demonstrates ways to build AI applications with Gradio, an open-source Python package. Freddy demonstrates building applications like a chatbot interface with just 50 lines of Python, discusses Gradio’s versatility in handling various media types, and its seamless integration with Hugging Face’s ecosystem. He also covers comparisons with tools like Streamlit and Shiny, emphasizing Gradio’s AI-first design, built-in API capabilities, and advanced features such as streaming outputs and multimodal support. Freddy concludes with insights into upcoming developments, including improvements in declarative UI rendering and agent workflows, showcasing Gradio’s continuous evolution to meet the AI community’s needs.
If you enjoyed this content, subscribe to receive updates on new educational content for LLMs.
Chapters
00:00 Overview of Gradio’s Chat Interface Freddy provides an overview of the Gradio chatbot user interface and walks through the code powering the demo.
04:21 Gradio’s Competition Freddy discusses the efficiency, built-in API, Hugging Face integration, and other unique features that make Gradio more suitable for AI applications compared to other UI frameworks.
08:27 Migrating to Gradio from Streamlit The Gradio UI is similar in design to Streamlit, with some differences in how they both react.
10:48 Gradio’s Streaming Feature Gradio supports streaming not just for text but for any generator, enabling functionalities like streaming from webcams and visualizing denoising in diffusion models.
11:55 Overview of Gradio Repository Most of the Python source code resides in the gradio
directory of the repository, with the js
(JavaScript) and client
directories being the other important folders.
13:46 Overview of Gradio’s Image Component Each Gradio component has two main functions: preprocess and post-process, along with several event triggers related to that component. Gradio uses Svelte for the frontend, with JavaScript-based interactions found in the js
directory.
17:00 Multi-modal Features in Gradio Freddy demonstrates the multi-modal textbox with the ability to add attachments and later shows how it can be integrated into the chatbox.
20:42 Using Gradio API in Production Gradio can be used for serious production workloads with features like queueing and concurrency control to prevent server crashes. Launching multiple Gradio servers can also help manage load.
22:57 Gradio Examples Gradio examples are sample inputs that guide users on the type of input a component expects. Example outputs can be cached to save resources.
25:16 Disadvantages of Using Gradio JS Client The Gradio JavaScript client allows you to take a model from Hugging Face and connect it to your own UI. Despite Gradio’s component library for easy use, it also provides the ability to create custom components.
28:40 Overview of Various Gradio Components Freddy showcases various Gradio components, such as PDF viewers, molecule viewers, maps, Hugging Face’s search box, and more.
31:50 Gen AI Apps on Serverless Architecture Gradio offers multiple ways of managing user load, from queuing and batching to more personalized features.
34:49 Visualizing Agent Workflows in Gradio Freddy introduces the new Gradio Agent Chatbot powered by the Transformers Agent API. The team is working on integrating it into the Gradio core.
38:20 Authentication in Hugging Face Spaces Instead of using Gradio’s ‘Authentication,’ a more secure option would be to use login via Hugging Face. Google OAuth can also be used in the Gradio demo.
41:54 Gradio Serving and Integration with FastAPI Gradio is built on FastAPI, which makes it easier to integrate into larger FastAPI projects.
44:23 Managing User Access User access can be managed using Gradio’s request component.
45:24 Gradio Lite Gradio Lite is a version of Gradio that runs entirely on the browser using Pyodide, making it ideal for running privacy-critical libraries.
48:47 Advanced Tables in Gradio The existing dataframe table in Gradio is quite flexible but lacks advanced filtering options. Gradio has custom components for performing filtering operations on the client side.
51:33 Upcoming Features in Gradio Freddy discusses the team’s ongoing efforts to improve Agents and LLMs in Gradio. The team is also exploring using WebRTC to stream data from client to server for real-time demos. Gr.Render is coming soon for creating more dynamic UIs.
56:18 Conclusion and Wrap
Resources
Links to resources mentioned in the talk:
- Huggingface chat examples
- Multimodal Chatbots with Gradio
- Tips for gradio’s max performance
- Visualizing agent workflows in Gradio
- Huggingface Discord channel
- Using Google OAuth with Gradio
- Docs on how to make requests from gradio-lite/pyodide
Notes
Building Chat Interfaces with Gradio
The following code snippet can be used to make a simple Gradio chatbot interface. respond
is function that takes in at least two arguments, the current message and a list comprising all the previous messages
= gr.ChatInterface(
demo
respond,=gr.Chatbot(height=400),
chatbot=[
additional_inputs="You are a friendly chatbot", label="System message")
gr.Textbox(value
] )
You can also use gradio blocks to achieve a more granular version
with gr.Blocks() as demo:
"# Chatbot")
gr.Markdown(= gr.Chatbot(
chatbot ="Agent",
label=(
avatar_imagesNone,
"https://github.githubassets.com/images/icons/emoji/unicode/1f917.png"),
)= gr.Textbox(lines=1, label="Chat Message")
prompt prompt.submit(respond, [prompt, chatbot], [chatbot])
Overview of gradio repository
The gradio repository has three main directory, gradio, js and clients
gradio/
├── gradio/ # Contains all the core Python code for Gradio.
│ ├── components/ # Source code for Gradio components (e.g., Textbox, Image).
│ │ ├── image.py # Implementation of the Image component.
│ │ └── ... # Other component implementations.
│ │
│ ├── cli/ # Command-line interface for developing custom components.
│ │ └── ... # Other CLI-related code.
│ │
│ └── ... # Other core Python files.
│
├── js/ # Contains all the JavaScript code for Gradio's front end.
│
├── clients/ # Client libraries for interacting with Gradio.
│ ├── python/ # Python client library.
│ │ └── ... # Other Python client files.
│ │
│ ├── js/ # JavaScript client library.
│ │ └── ... # Other JavaScript client files.
│ └── ... # Other client libraries.
│
└── ... # Other project files.
Multimodal elements in Gradio
Gradio supports a wide range of multimodal elements. A simple multimodal textbox can be made using
=True) gr.MultimodalTextbox(interactive
You can also give multimodal support to chatinterface by passing multimodal=True
to gr.ChatInterface
Mounting Gradio in FastAPI
You can mount an existing gradio app into a FastAPI to make it part of a larger project.
from fastapi import FastAPI
import gradio as gr
= FastAPI()
app @app.get("/")
def read_main():
return {"message": "This is your main app"}
= gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
io = gr.mount_gradio_app(app, io, path="/gradio") app
Full Transcript
[0:03] Freddy Boulton: I prepared this Hugging Face space that shows all the different ways that you can build a chatbot with Gradio and for different cases of where your model is running, whether it’s running on a separate API server, whether it’s running locally. So I can show you this is a- But you can play around with it as well? Yeah, yeah. I posted it in my Hugging, in the… I put it in the office hours, yeah, in the Discord. I put it here. Yeah, yeah. So if people want to follow along, they can go here.
[0:42] Freddy Boulton: But yeah, so this is like a chatbot, you know, like, you know, how do you do a for loop in Python? And it’ll should stream, you know, so this is like, yeah, like a chat GPT UI, you know, in your, you know, right here. And, you know, there’s like functionalities for. you know, like retrying that, you know, undoing it, clearing the whole chat. But yeah, so like this is like a, you know, a full UI that you could use to build like a, you know, like an app around your LLM, right?
[1:13] Freddy Boulton: And this is the code that goes into it, right? So as you can see, it’s only, you know, 50 lines of code. So it’s not, and it’s all Python. So yeah, it’s pretty quick to get started. Yeah, so in this case, this is like interfacing with, you know, it’s using the Hugging Face like imprints API to query the LLM, but I’ll show you guys an example with transformers, like if it’s running locally before you deploy it. But yeah, basically what this is doing, it’s creating, you know, a Gradio chat interface.
[1:44] Freddy Boulton: So this is like a one line UI for your LLM. And in order to implement one, all you need is this function here, respond. So respond takes It takes one, basically two parameters at minimum. The first parameter is like the current message that was typed in the text box. And then the other message or the other parameters, like the list of all previous messages. And they’re, you know, right now we don’t support the OpenAI format.
[2:14] Freddy Boulton: We support, you know, we have like a, they’re passing us like a list of tuples, but we’re working on supporting the OpenAI message format for at least, you know, probably like about the next two weeks or so. But yeah, so you just, you know, create.
[2:25] Freddy Boulton: you know format the history and then you just feed it to your api and then use yield each successive token you know you append it to the response and then that’s how you know like the it’s just like a simple core loop and that’s how you get um like the streaming that you see here um yeah so like this this tracks like all of like the the message history and and all that stuff so um yeah so it’s you know once you have your your model trained if you wanted to share with someone create a
[2:54] Freddy Boulton: ui around it it’s you can do it in about you know 50-ish lines of python that’s super cool and you get to do this stuff for work yeah so a lot of what we’re doing at gradio now is making this like even easier like how can we like you know make the chatbot better how can we add like you know uh more components and stuff like radio isn’t just for chats you know there’s like everything, like, you know, like, image generation model, image components, video, audio, 3D modeling, all that stuff, we can build it in
[3:28] Freddy Boulton: Gradio. It’s all about how we can make Gradio the easiest library for creating any sort of AI app purely in Python with as little code as possible, with as few additional concepts introduced and stuff. Yeah. And this whole thing is built in Gradio, too, which is cool. So this demo.
[3:49] Freddy Boulton: you know is this is a grader demo um so um yeah there’s like a code component there’s like all the stuff tabs you can create like you know pretty complex stuff like with with just radio so awesome and i actually shared earlier in the discord um a tutorial you did on a youtube tutorial on multimodal chatbot stuff as well which is yes yeah exactly uh if there’s uh i can show yeah some some multimodal stuff if there’s questions around that i can i can show how how you do that Yeah, that’s pretty good.
[4:18] Hugo Bowne Anderson: It would be fun to get to that. We’ve got a bunch of questions, and two of them, which people have upvoted a lot, was going to be pretty much my first question also. They revolve around the… People have mentioned Streamlit and Shiny in terms of comparisons. There’s… I mean, a more general question is around the competitive landscape, because we do have Shiny R and Shiny can be used from Python. We’ve got Streamlit. We’ve got…
[4:43] Hugo Bowne Anderson: I think Dash and people do things with Voila from notebooks and people can like build stuff from the ground up using Flask relatively straightforwardly these days. So I’m wondering, perhaps you could tell us a bit about the landscape and why people would choose Gradient.
[5:01] Freddy Boulton: Yeah, certainly. I mean, I think like all tools are great. Like I’m not here to say that, you know, whatever, like I’m not here to bash any other library that makes it really easy to build a UI. I will talk about like some of the things that we think are, you know, one of the things that are some of the things that make Gradle really nice. One is just that it’s like built for like AI first.
[5:21] Freddy Boulton: So there’s like a lot of like really like high level abstractions that make it really easy to build the kind of things that as an ML researcher, like AI.
[5:30] Freddy Boulton: you know ai ml engineer um like that you would want to do so you know the first thing is this sort of like this chat interface right so it’s like you know one line full chat ui with like all these different like messaging abilities you know there’s like the ability to um it’s not shown here but you could actually make it so that you can like upvote and download um like messages like you know there’s like all these things that you would want to do for chats like greater makes it really easy to do that
[5:56] Freddy Boulton: um so i think like that’s one of like the the the things that makes it that makes really really great it’s like designed for like ai first um you know some of the other things that we like i think radio like is really good at is the like the the api like the built-in api usage so um let’s say like you know like let’s say like this is an example where you know you have this is all transformers code right so this is a um like the same sort of chat but it’s built with transformers
[6:22] Freddy Boulton: is running locally right So now you have a UI, right? But let’s say that you also wanted to use this model as an API, right? Because you wanted to use it elsewhere. You want to just use it via API. You don’t want to use it via the UI. Gradio comes with a built-in API. So if you didn’t see that, if you scroll all the way to the bottom, there’s this use the API. And then this is like a Gradio client library that comes installed with Gradio. And this shows how you can just kind of query.
[6:53] Freddy Boulton: like the chat um oh sorry the chat with uh you know with radio and then you get like a a full API and it’s not just for like these kind of chat applications for any radio application it’s like a built-in API um that you can use uh from anywhere um and then some of like the other cool stuff about gradios that like the the integration with Hug Me Face is quite nice um so if you have a radio demo that runs on Hug Me Face and uses PyTorch you can use this thing called zero GPU
[7:23] Freddy Boulton: which is like a like a shared sort of gpu cluster um and it’s free if you’re like a hugging face pro subscriber so this this demo that’s running on a um you know it’s running a transformers model locally on this computer um you know like i’m not paying for the gpu right now so if you have like you want to deploy your model that needs a gpu you can use radio and hugging face so to do it without paying for the gpu um so that’s like another um like another cool thing about about radio um
[7:52] Freddy Boulton: But yeah, and I think, you know, we’re making Gradio better every day. But those are like some of the three things that I think, you know, make it useful, particularly for like this AI use case.
[8:04] Hugo Bowne Anderson: Absolutely. I’m glad you highlighted the integrations with Hugging Face because that’s one of the big value props for me. I mean, I just, Hugging Face is such a wild space for me, in all honesty, like the models and data sets that come out all the time. It’s so much fun to explore. And the fact that it integrates so nicely with Gradio is a huge part of the value prop. So that’s super cool. There is a related question. Someone’s interested in learning Gradio and migrating from Streamlit.
[8:34] Hugo Bowne Anderson: So I don’t know whether you have any thoughts upon what that process is like or any advice you’d give there.
[8:40] Freddy Boulton: Yeah. You know, we don’t have like a dedicated like migration guide on the docs or anything. I think, you know. it’s very similar to Streamlit in the sense that the UI is declared. In this case, it might be a little bit clearer. This is using a different sort of radio API called the Blocks API. And you can see that the UI is declared. The UI is a declarative UI API. So the UI is rendered how you see it here. First, it’s a markdown that shows the title, then the chatbot, then the textbox.
[9:19] Freddy Boulton: It’s very similar to Streamlet. It’s very declarative. The one difference is that in the way that Gradio knows when to run your Python function, you have to tell it when one thing changes, run this function. So that’s what’s happening here. When someone submits a prompt, run the respond function with these inputs. That’s the one difference with Streamlet. You have to be a little bit more imperative, I guess, with the reactivity. But the benefit of that is that you get the, that’s how we know how to build the API for you.
[9:54] Freddy Boulton: And the other sort of benefit of that is like radio only updates the things that you tell it to. So that it actually helps with performance as well. And yeah, like, Gradio, you know, if you ever go on Reddit or whatever, you hear people talk about Gradio, they’ll say, oh, it’s only for these sort of demo toy use cases. That’s something we’re trying to push against a little bit. Because you could serve a lot of traffic from a Gradio UI.
[10:18] Freddy Boulton: You know, like the LMS leaderboard, for example, built entirely on Gradio, they handle something like it’s something crazy. I think it’s like several tens of thousands of requests a day with a Gradio server.
[10:29] Freddy Boulton: So yeah, like radio is actually pretty pretty performant so um yeah so that that’s sort of like the main difference has to be a little bit more um imperative with the reactivity but um apart from that they’re similar in interest like the ui like design philosophy i would say yeah cool um the example you showed had
[10:49] Hugo Bowne Anderson: streaming components and reuben has a great question does it work with streaming out of the box yes um so uh basically like you can stream anything not just text
[11:00] Freddy Boulton: And the way you do that, it’s just from within the function that you tell Gradle to run, you just implement a generator. And then Gradle will just know to just stream that function, like the contents to the UI. So yeah, it’s not just text. You could do it for a diffusion model. That’s something we’ve seen a lot. People stream the results of the diffusion model. So you can see the image go from white noise to the actual image at the end. It’s a pretty slick UI. Yes, you could do that with…
[11:30] Freddy Boulton: Yeah, with like images in that case, you could also stream from your webcam and stuff like that. So if you’re doing like an audio streaming demo, like with Whisper or something like you could do that as well. You could stream to the server and back.
[11:45] Hugo Bowne Anderson: That’s super cool. Kit has a great question. Firstly, Kit says, first, bravo and thanks for the great work. You really nailed the core use cases. Could you take us, this is nice, could you take us briefly through the Gradio repository, outline the moving parts of the code, telling us roughly how it works?
[12:05] Freddy Boulton: Yeah.
[12:05] Hugo Bowne Anderson: Perhaps tell us where contributions make sense to you, what’s needed, where it’s going. So yeah, that type of overview could be super cool.
[12:13] Freddy Boulton: Yeah, for sure. Yeah, so Gradio, it’s a little bit different from other sort of Python open source packages, just because there’s a big JavaScript.
[12:25] Freddy Boulton: component um but uh yeah basically the way that the the the library is laid out it’s like two main you know two main directories that as a newcomer you you know you would want to familiarize yourself with the first is this radio directory which this that’s where all the python code lives um and you know that’s like all the source code for like the components um so like the radio text box radio image component all that stuff as well as like the fast api server like all that stuff is in here.
[12:53] Freddy Boulton: I can go into that in a second. And then also like the JavaScript is the, like the other main half of it. Right. And then the third component is the client that I can talk to about later. I can show, you know, we’re going to 1.0 the clients in about two weeks. So we can talk about that later if people have questions about the clients. But yeah, so this is like, you know, like the Gradio sort of source code. Right. So, you know, there’s like a CLI for developing like custom components and stuff.
[13:23] Freddy Boulton: That’s the other cool thing with Gradle. You can create completely new components that work the same as any core component. So that’s what this CLI is doing. But most of the logic goes here. These are all the Gradle components, the checkbox, the code, all that stuff. And then I could show maybe the image, for example. The image is probably one of the most popular components. This is kind of like how a component looks like. These are all the events that are defined for a component. So, you can stream an image. You can upload an image.
[14:01] Freddy Boulton: When you change an image, that can trigger an event. And these are the constructors and stuff. And the two main methods that all components implement are this preprocess function. Basically, that takes the data from the server and that kind of puts it into like a. Python friendly format. In the case of image, you can select to receive an image from the server, or from the front end, I mean, as a numpy array, a PIL image, or a file path. This is what handles that logic. And then the post process does the opposite.
[14:38] Freddy Boulton: If you want to update an image, you can return a numpy array, a PIL image, or a file path, and then Gradle will turn that into something that the UI can display. So those are like the two main methods that every component has and then like the constructor obviously has like all the, you know, all the constructors and stuff. So that’s sort of like how all the components are defined on the back end. And then, you know, the other half of the coin is like in the JavaScript, right?
[15:08] Freddy Boulton: So Gradio is built with Svelte on the front end, which is actually pretty easy to learn. I didn’t have a lot of experience with it when I started working on Gradio, but I feel pretty, you know, after a couple of days, you kind of get up to speed. But yeah, so this is like how the checkbox is implemented in Gradio, right? So JS checkbox and then. This is when all the events are dispatched.
[15:33] Freddy Boulton: So whenever you see radio.dispatch changed, that’s when the change event of the checkbox is triggered and that’s when all their Python function will run, basically. So that’s kind of like a high level of how everything works. I can go into a little bit more detail, but I’d rather cover a little bit more high level stuff. We don’t go into all the weeds here because to build a demo, you don’t have to know all this stuff. But… But yeah. And then there was one more thing about contributing.
[16:02] Freddy Boulton: Basically, you could contribute to any sort of issue would be welcome. There’s a lot of like, yeah, pretty much any issue would be good. Some are sort of back end issues. We try to label those as being a back end issue. This could be a good example here. So, adding a delete event to the file component. So, this would cover both the back end and the front end. But yeah.
[16:28] Freddy Boulton: there’s like lots of issues that you know it’s we’re having a hard time doing everything that we want to do so if you want to help out just comment on the issue like hey i’d like to work on this and then it’s yours very cool and it’s great to see the good first issue label as well super
[16:44] Hugo Bowne Anderson: super useful um that was awesome freddy we’ve um And if later on, near the end, we want to get deeper in the weeds with this type of stuff, we can, but I do like keeping it at a high level. We do have a question around multimodality. So anonymous attendee asks, what are some of the cool features that Gradio supports for audio and multimodal? Is there only turn-based or is there streaming there too?
[17:13] Freddy Boulton: Yeah.
[17:14] Hugo Bowne Anderson: Yeah. And then will be needed for future GPT-4-0 model like UX.
[17:19] Freddy Boulton: Yes. So, yeah, the GPT-4.0 thing is something that we’re working on now, how to, like, make that really slick. But, yeah, like, for, like, multimodal, like, chatbot kind of thing, like, Gradio has a couple of good components for that. So the first thing I’ll do is show you the multimodal text box. So Gradio has, like, this multimodal text box here. So you could use it to sort of send both text and attachments. to any demo, particularly for, but it works good for chatbots and stuff.
[17:53] Freddy Boulton: So you can attach images or any kind of file, and then you can say what’s in this image or something. Right. So that’s sort of just like a multimodal text box. So that’s what this component is. But obviously, it’s really cool when you combine that with a chatbot. So I’ll show you what that looks like now. So multimodal. I think it’s multimodal chatbot. Yes. So this is like a, you know, it’s not interfacing with an LLM. So the response will be like really, really silly. But you know, like what do you think? Yeah, that’s cool.
[18:40] Freddy Boulton: And then this is what I was talking about earlier. You can like define like. Thank you. But yeah, so this is like how you can build like a multimodal chat with Gradio. There’s this multimodal chatbox, textbox component. And then you can just, I’ll show you the code now. It’s pretty similar to the other ones. You just, you know, you define a textbox. And then, you know, you can say, sorry, let me move this out of the way. You can say like what kind of, you know, you want to accept images or, you know, or what.
[19:11] Freddy Boulton: And then, you know, when you submit something to this textbox, you know, run this function.
[19:16] Freddy Boulton: and then that’ll run you know this function here so that’ll add it to the history and it’ll also clear the the multimodal text box um and then it’ll in this case it always responds with that pool so that’s why i asked what i thought because i knew what the answer would be um but yeah so this is uh i’ll ping this i’ll put this in the chat this is our in the discord so multimodal And then also, if you want to write even less code, you can make the chat interface multimodal as well with just
[19:51] Freddy Boulton: one parameter. Oh, no, it’s broken. Okay, I will. I don’t know what’s going on there. But basically, I’ll get this up and running. But yeah, basically, if you want to have a multimodal chat interface, all you have to do is set multimodal true. And that will create the same sort of chat UI as you have here. But it will let you upload, like, files in this text box as well. And then it will, you know, display everything. Yeah. So, I’ll put this in the Discord as well. And then I will unbreak it.
[20:36] Hugo Bowne Anderson: okay wait thanks freddy um got a great question from andrew grangard can should i ship gradio based api um or maybe apps to production um yes
[20:52] Freddy Boulton: i mean i think i think it depends on you know exactly you know what you you know how heavy it is that the the processing that the radio server is going to be doing But yeah, I would say you can ship very performing Gradio demos that handle a lot of traffic. And yeah, we also have a guide around how to do that. So I will share that here.
[21:19] Hugo Bowne Anderson: That’s cool because there’s another question, which is, is Gradio meant for enterprise commercial use? Any tips on deployment and advanced usage tips for Gradio for production purposes? Yes, I will.
[21:27] Freddy Boulton: Yes. I will share that. Where is it? Maximal. Here we go. Set up a demo for maximum performance. Yes. So, let me put this. Tips for Gradios. Sorry. Let me. Okay. I’ll answer the question a little bit more. But, yeah. I think Gradio can definitely handle, like, a lot of, like, it can definitely handle production use case.
[21:58] Freddy Boulton: If you’re running, like, a very heavy, like, GPU-intensive task, Gradio has like a built-in queuing mechanism to try to like handle that load for you so you can make it such that like or you can control the amount of concurrency for that task so that like you don’t run out of gpu memory for example um or that you know like um you know you don’t the server doesn’t like crash or slow down or anything like that um so there’s a lot of tricks around that around how you can do that um and also like the
[22:26] Freddy Boulton: other pattern that we see work really well is to you know you can spin up a lot of like these like independent Gradio servers and then just load balance between them and that works pretty well for a lot of use cases as well. But yeah, I think like, you know, like DALI was created with like a Gradio UI. Like I said, the LMS leaderboard runs like with Gradio. So you can definitely handle like a lot of traffic.
[22:54] Hugo Bowne Anderson: Awesome. So we have a few more specific questions. So Shreda asks, In Gradio window, the LLM chat, gradio.chatbot, is it possible to display some buttons? For example, predefined topics or questions to initiate the chat with the LLM?
[23:13] Freddy Boulton: Yes. So, yes, yes. Gradio has this thing called examples. So, I’ll show you guys a, like, a mistral, this one. You can see here, here’s some examples. So these are some sample prompts that you can use to sort of like refill. I think this is kind of where you’re getting at. How can you sort of like give my users an idea of how to use this?
[23:48] Freddy Boulton: So you can, you know, Gradio has these constant examples which are basically just like what are some example input components that I can let my users try in my UI, right? It doesn’t just work for chat. Any Gradio demo has this concept of examples. there’s an examples component that you can use to seed the demo with data. And in the case of multimodal, you could provide sample prompts and images and stuff like that. And then Grado can also patch the outputs of these examples.
[24:18] Freddy Boulton: So if you click them, the answer will also show up as well. So that can help in the case of people. You want people to know how your model behaves without actually using any of your GPU resources, for example, without actually running anything. you can tell Greedo to cache the results of these. So I can show you what that looks like in the code. So in this case, it’s just an extra parameter here to the chat interface. It’s just examples here. And then you just provide your examples. In this case, we’re not caching the examples.
[24:54] Freddy Boulton: But you can just set this to true, and that’ll do the caching mechanism that I was talking about earlier. Yeah, so I think that’s kind of what the, you know, hopefully that answers the question. Let me know in the chat if you had something else in mind. But yeah, you can definitely provide some sample inputs for your users so they have an idea of how to use your Gradio app.
[25:15] Hugo Bowne Anderson: Very cool. We’ve got a nice question from Lorian as well. Lorian is more comfortable for UI with JavaScript. So what are the current disadvantages of relying on the Gradio JS client?
[25:28] Freddy Boulton: and custom for examples felt are front-end components yeah so the um so the javascript client is you know we like you know two of two of the two of the engineers on the team keaton and hannah have been working pretty diligently and hard to get the the javascript client ready for 1.0 in about two weeks or like yeah i think like 10 days so june 6 is the 1.0 release of the client so by then like the javascript client will be pretty pretty pretty solid And we’ve already seen a lot of really cool community demos
[26:00] Freddy Boulton: being built with the JavaScript client of like, you know, you don’t want to use the greater UI, you want to use your own UI, but you want to use a model that’s posted on a Hugging Face space. You can basically put that model in your UI with the JavaScript client. It can bridge the gap between your UI and the Hugging Face hub. So we’ve seen a lot of cool demos built with that. So, yeah, like in the past, JavaScript client was a little bit. like rough around the edges, but we’ve completely revamped.
[26:28] Freddy Boulton: It’s a lot easier to use. So I’ll say definitely try it out. And, you know, let us know if you run into any issues, but, you know, from what I’ve played around with it, it’s pretty slick. And then like the other, the second part about the question, like, you know, like what if you want to use like your own Svelte code, like certainly you can definitely do that.
[26:46] Freddy Boulton: But I think like the cool thing about Gradio is that it sort of, we did all the hard work around defining a component library, so you don’t have to, right? So. Even if you’re a really good front-end wizard, I always find it really annoying to create a good checkbox from scratch. Or messing around with the flexbox and making sure the UI looks actually really good and things are in proper rows and columns and all that stuff. And making sure that the height properly fills in the entire content of the page.
[27:19] Freddy Boulton: That kind of stuff is kind of annoying for me. Gradle can handle that for you. So I think Gradle is a really good… place to start. And then if you always wanted to do something a little bit more custom, you can create your own Gradio component. So that’s something that we shipped a couple months ago. But let me go back to the app. Yeah, but we have this custom component gallery.
[27:40] Freddy Boulton: So these are like, you know, like, let’s say you want to use, like, something, you know, like, you want to do something that we don’t have support for in Gradio Core yet. You can create one of these, like, components, right? So like, this one’s actually like really cool. It’s like this rerun.io. Someone created a rerun.io viewer, which is this multimodal data viewer entirely in Gradio. So that’s really cool.
[28:04] Freddy Boulton: So if, you know, like, Gradio can do a lot of the boring stuff, and then for the fun stuff, you can just write some minimal salt to do the cool stuff you want to do and just plug it into the rest of the Gradio, like the Gradio demo, right? And people can use this from Python, which is pretty incredible. So yeah.
[28:20] Freddy Boulton: So that’s something that, you know, like if you’re comfortable with front end like radio might still be useful for you in that regard i think you got muted uh hugo so this is a really cool gallery man i was just wondering if um maybe you can show us a a few more of them by any chance oh yeah for sure so uh some of the cool ones so like the pdf one um so i really like it because i made it but um but there’s like this pdf component so you know like let’s say you
[28:55] Freddy Boulton: have like a question answering like llm right that like you know like document qa like you could use this pdf component to like you know like answer uh questions about your you know your pdf right so supports multiple pages and stuff like that and like it’ll render the pf completely like in the browser for you um and then some of the cool ones are um just quickly for the pdf one i’m able to plug that into any model i Yeah. I mean, like, if your model accepts a PDF, like, yeah, for sure.
[29:27] Freddy Boulton: Like, you’ll get a PDF, like, in the Python and then just feed that to your model. Yeah. And, like, these things are, like, I think it’s really cool. Like, you know, you just, like, pip install Gradio PDF, and then you have a PDF component that you can just place, you know, like, in your Gradio UI. So, yeah. And then some of the other cool stuff. So.
[29:54] Freddy Boulton: you know this is like really cool like i don’t i don’t actually even know how to do this properly but um someone made like a molecule viewer viewer in uh in gradio so yeah like i don’t even know what the right input is for this but it i’ve seen tweets of people using it it’s really cool because it’ll visualize like a molecule like completely in the gradient like you can like tweak it and like you know change it edit it that kind of stuff so you know if you’re really into like biochemistry or that kind
[30:18] Freddy Boulton: of stuff like you could use like this component um um you know like this model or this is this is really cool because it’s basically like the you know like that search box you see like in the Huggyface hub this is basically that as a Gradial component so like let’s say you like you know you know you want to like be able to like download like a list of models or something from the hub in your space you can use this you know this sort of uh like component to do that and it’s like has
[30:46] Freddy Boulton: like all like the like like all like the you know it has like those really slick autocomplete so like it’s really cool. Yeah, so there’s like a lot of stuff. This one’s good for geospatial data.
[30:58] Hugo Bowne Anderson: I’m a huge fan of Foley. I’ve been a fan of Foley for about a decade now, actually.
[31:02] Freddy Boulton: Yeah, it’s really cool. Yeah, so you could use this to sort of embed any kind of map into Gradio. Yeah, so there’s a lot of cool stuff here that I think certainly people aren’t using yet. Yeah, so that’s beautiful.
[31:24] Hugo Bowne Anderson: beautiful stuff freddie i’m really excited to go and explore this stuff a lot more myself someone in the discord has written so many ideas to explore i think the course will leave me with 500 days of homework um which i like the 500 days i um i would encourage people to not consider this homework this doesn’t this doesn’t even feel like work right this is so much so much fun um anand has a great question would you recommend gradio for building multiple users gen i gen ai apps on the cloud and also in general should
[31:55] Hugo Bowne Anderson: gen ai apps be running on a serverless architecture uh i don’t know what you mean by multiple users in that question oh yeah like yeah certainly multiple people can use like a radio demo like concurrently that’s what it like means like how many i suppose how many users would it support um or how like how to yeah
[32:21] Freddy Boulton: Yeah, I mean, it depends a lot on, yeah, like, what exactly, what hardware you’re using to run the Gradio server. Like I said, like, you can tweak Gradio to be, like, as, you know, you can tweak Gradio to the specs of your machine, right? Like, I was talking about this thing called, like, the queue earlier. So, like, Gradio by default, like, kind of queues all the incoming requests. And then by default, it’ll only run, like, one GPU-heavy thing at a time, right? So, that’s done because by default, you don’t want to run a GPU memory.
[32:50] Freddy Boulton: but let’s say you have like a really nice gpu like you could you could crank that up so that such that you run multiple of these things at a time you can also batch requests with radio uh so you could like um you could like handle multiple like incoming requests at a time um so that can help you build a more performant demo um but yeah like it depends a lot um on like exactly like what hardware and stuff that you have going on um you have at your disposal certainly like you know if you
[33:18] Freddy Boulton: want to like host your lm and like modal like on like hugging face or like you know replicate something like that and then just like for a form radio via like the api like certainly that would work too um and in that case like the gradial server would be like a little bit more stateless in that in that regard um but um but yeah like i think both both patterns would work it’s just a matter of like what you’re like what your budget is what you’re comfortable with what you’re comfortable with all that stuff yeah
[33:44] Hugo Bowne Anderson: it makes sense um and so with of course we have our discord but like downstream future music if um people want to like learn more about this type of stuff or chat with the community is is there a good place for people yeah for sure for sure so the the hugging face uh discord has a pretty big radio community so there’s like a radio uh this is a hugging face discord i’ll post a link in the in the you know in the in the dis in our in our discord later um like the join one
[34:13] Hugo Bowne Anderson: uh but yeah there’s like this radio
[34:15] Freddy Boulton: You know, question channel, like a lot of community members just answer each other’s questions here. It’s actually really cool. And we make a lot of like radio announcements here. And like we have like this sort of radio verse community channel for people to share, you know, what they’re building, what they’re, you know, what they’re having trouble with and stuff like that. So I would say this is the best place for like, like the gradient community.
[34:38] Freddy Boulton: And certainly if you have like a feature request for a bug or something like that, like just follow that on the on the on the repo, and then someone will get to it.
[34:45] Hugo Bowne Anderson: Awesome. Thanks, Freddie. Got a question from Colin. Have you seen any interesting designs for multi-agent collaboration visualizations? And Colin says, Colin’s been messing around with agentic workflows and it’d be cool to mock up dashboards quickly when tweaking interactions.
[35:01] Freddy Boulton: Yes. So that’s like a really cool topical question. That’s something that we’re working on now is implementing like the agent’s agent workflow with radio. And I will show you guys actually actually built a custom component to do that to sort of test out like the API and all that stuff. So I’ll show you that now. Yeah. So this is a a. like an LLM agent running on Transformers. So Transformers released an agent API, so you can like kind of build an LLM agent with a Transformers library.
[35:40] Freddy Boulton: And this is sort of like a UI for that. So like, you know, like, show me a picture. Let’s see if I can type. So we should see it soon, hopefully. Yes. So, right, so, like, here you can kind of see, like, the chain of thought of the agent, right? So, it’s like, okay, I need to generate a QPAT. I’ll use this image generator tool. And then it shows you the tool that it used with, like, the prompt. And then it shows you, like, what the image was, right?
[36:17] Freddy Boulton: So, there’s, like, a fully functioning, like, LLM, you know, if we go to the space, it can show you the code. So, like I said, this is a custom component. So, right now, it’s not part of Gradle core. But if you install this, you can use it for the time being. So, yeah, there’s an agent chatbot component. And then this is the code. So, it’s a little bit more involved because there’s a bunch of tabs and stuff. But at the core, it’s basically what I showed earlier, where there’s a chatbot, a text box.
[36:47] Freddy Boulton: When you submit, run this Python function. So, that’s how you can do the sort of the… the agent stuff. It works with Langchain as well. So it’s not just tied to Transformers. But yeah, so definitely agents is something we’re working on right now. You can consider this a pre-release in this custom component. We’re working on adding that to Gradio Core shortly. Multi-agents, certainly you could do that. But it’s not like… Right now the Gradio chatbot assumes there’s only two speakers.
[37:20] Freddy Boulton: But you could think of ways of maybe if it’s depending on the speaker, in your message, you’d say this is whichever speaker or something like that. But certainly a multi-agent chatbot could be a really cool custom component that someone should build. So if someone wants to do it, they should do it. We would love to communicate that and share that. But yeah, so the multi-agent, multi-speaker is not something that we’ve built yet, but the agents we’re working on that should land in core shortly.
[37:50] Hugo Bowne Anderson: That sounds awesome. And so Colin, that sounds like if you have the time, creating a custom component could be super cool and let us know how you go. Would you mind putting that in the Discord as well,
[38:01] Freddy Boulton: Freddie? Yeah, yeah, for sure.
[38:04] Hugo Bowne Anderson: And it was a really cute cat as well.
[38:11] Freddy Boulton: Visualizing. Yes.
[38:20] Hugo Bowne Anderson: So Matthew Miller has a bunch of cool questions. Is there a plan to enable authentication in Hugging Face spaces that doesn’t require allowing cross-site cookies? I haven’t experienced this issue myself, but can’t remember exactly what the issue is. It currently doesn’t work for Safari mobile, for example.
[38:39] Freddy Boulton: Yes. Yeah. So in terms of authentication, there’s like two sort of things that you could do that are a little bit more robust to the built-in Gradio authentication. So yeah, the Gradio authentication is kind of like, you know, that’s sort of like a, it’s not really, we’re thinking of ways to, things to call it that’s not authentication because it kind of gives people the wrong idea. It’s not super secure, to be honest. It’s just kind of like the minimal access control you can do.
[39:06] Freddy Boulton: But one thing that’s really cool is that there’s like a sign in with hugging face button that you can use to put it in your Gradio demo. So I’ll show you a, I’ll show you a so my space, I think. Sorry, let me think of a cool demo. Did you? So I don’t know if you’ve seen this, but this is a this is a demo that like once you have like your fine tune that LM this will turn it into GDUF format so that people can run it like it’s a quantized format.
[39:41] Freddy Boulton: So this will do it all with this radio demo. And part of the you know, You can only do that with your own models. So you have to sign in the Hugging Face to do that, right? So how do you, like, you can do that with Gradio with like this like little button here. And it says, you know, like it’s gonna, you know, it tells you what permissions it’s gonna ask for. You can, you know, say whether or not you wanna do that or not. Yeah, so grant and then I’ll do it in my Gradio.
[40:10] Freddy Boulton: Cool. So yeah, so now I’m logged in to my Hugging Face account. So if you go to the code, it’s just like another Gradio component.
[40:18] Hugo Bowne Anderson: We don’t have a lot of context around GGUF as well. GGUF is what has helped me run models locally on CPUs also. And it’s been a game changer, in all honesty.
[40:29] Freddy Boulton: Yeah. So, like, you know, like, let’s say you’ve, you know, at the end of the course, you have a fine-tuned LLM. You want to run it on, like, a CPU. You want to convert, you know, you can convert it to UF. You can do that all with Gradio on the hub. So, this is, you know, I’ll share this as well on the Discord. But, yeah, I wanted to show you guys because of, like, this, like, login functionality here that just it’s, you can use that here. And it’ll use OA.
[40:50] Freddy Boulton: So, it won’t use cookies or anything. Or, like, yeah, like, the cross-site cookies. Yeah. And it’s just, like, this, like, you know, let me go all the way down.
[40:59] Freddy Boulton: uh login button right here so it’s just like a very simple video component um and then there’s also additionally you can add like Google oof to your demo as well um so let me see if I could find that quickly but yeah so there’s more than you don’t have to just use the cross-site cookies like we’ve um we’ve um uh we’ve uh yeah we’ve uh like sorry I lost my turn but yeah we we’ve pulled like other sort of like authentication mechanisms into it into radio so i think uh let me go find that oauth
[41:33] Freddy Boulton: here i think it’s i’ll find it later i can’t i can’t find it right now but yeah like there’s a there’s an example here of using radio um oauth in your or google oauth in your radio demo so i’ll uh i’ll i’ll show that um i’ll put that into discord at the end but yeah it’s certainly possible cool um
[41:54] Hugo Bowne Anderson: What a question around does Gradio integrate with FastAPI? I’d love to know that. But I think more generally, just how do you all at Gradio think about the serving story?
[42:04] Freddy Boulton: Yeah, so Gradio is built upon FastAPI. Gradio is a FastAPI server. It just serves a very specific index.html file that has all the Gradio front-end stuff in it. The way that you can think of Gradio, it’s like it’ll take like… It’ll take all of this. Basically, Gradio will take all your source code and turn that into, like, a JSON config and then serve that via FastAPI to your browser. And then the browser will, like, run all the reactivity and stuff.
[42:38] Freddy Boulton: And then whenever, like, something happens that requires Python to run, it’ll send a request to the FastAPI server. FastAPI will run it and then send it back. So that’s kind of like Gradio, like, at a very high level, like, how the architecture works. And Gradle is basically just like a fast API server. So like when I, all that stuff, when I shared earlier of like the, like the API stuff, like that’s just like the fast API server that’s running it. There’s nothing fancy, nothing, nothing, nothing crazy like that.
[43:08] Freddy Boulton: So, you know, like one of the cool things about Gradle being built upon fast APIs, it’s very easy to integrate it within a larger fast API application, right? So fast API has this idea of like sub applications. Um, so.
[43:21] Freddy Boulton: you can basically mount a full grader ui in like a url of like your larger fast api app if you have like a larger app that does a bunch of other stuff that’s beyond radio you can still use radio to like just mount it within your your application that way you don’t have to deploy a whole separate server or anything like that for for radio i can just integrate very very seamlessly into fast api um yeah so i could show um let me show an example of how to do that um as well I think
[43:50] Freddy Boulton: in the docs. Here, mount Gradio. Here we go. So this is how you can take, you have a FastAPI app, and then you want to mount a Gradio at the Gradio path. This is how you would do it. Yeah, so yeah, it’s pretty cool. Yeah, Gradio can, it’s just basically, everything’s a wrapper now. Gradio’s a wrapper on FastAPI. It’s a very, very cheap way.
[44:20] Freddy Boulton: to put it but awesome um dmg has a question how can authentication and authorization be integrated into gradio to manage user access um right so basically um gradio so when you like um radio has this thing called like the request so um you can add a parameter called request um to your function your python function and then you will get like a fast api like request that you can see who’s logged in, all that kind of stuff. And then depending on that value, you can say if this user is not who I think it is.
[45:01] Freddy Boulton: just don’t run the function, raise an error, that kind of thing, right? So you can use that sort of pattern to control which parts of your app are accessible to which user and that kind of stuff. I think that’s kind of what the question was getting at, but yeah.
[45:20] Hugo Bowne Anderson: Matthew Miller has another good question, and it’s actually around Gradio Lite, and we haven’t really talked about Gradio Lite. So maybe you can give us a whirlwind tour of…
[45:31] Freddy Boulton: Yes, so Gradio Lite is a, you know, it’s just a version of Gradio, but it’ll run entirely in your browser. It’s used Pyodide. So it’s like serverless radio, basically. So that’s really cool. Because, you know, like, let’s say that you have like, you know, you want to like transcribe audio and like you’re worried about like privacy, all that kind of thing. You could do that basically entirely in the browser using like, you know, like Whisper Lite and, you know, and Gradio Lite. So I can show, oh, sorry, here in the docs.
[46:06] Freddy Boulton: So yeah, so you can go here to Gradio Lite. Yeah, and then this is how you basically just add this to your HTML. And then you write your Gradio application within the HTML, right? But like you’re using Python, you’re not using like, it’s just Python. And then PowerDat will run it for you. And then… Yeah, that’s how it works. And then you can separate into multiple files if you want and stuff, but it’ll run entirely in your browser. And then there’s actually some really cool demos of using Gradio Lite with transformers.js.
[46:43] Freddy Boulton: So if you’re not aware or if you’re not familiar, transformers.js is the Python Transformers library, but running entirely in your browser. And it supports a staggering amount of tasks and models. It’s pretty incredible, actually. And then… So if you have a Transformers JS model that you want to create a UI around, but you don’t want to build a whole UI, you don’t want to worry about what component library to use, anything like that, you could just use Gradio Lite to basically run your Transformers JS model in a nice UI in the browser. It’s pretty slick.
[47:18] Freddy Boulton: I’ll try to find an example of that and put it in the Discord later.
[47:22] Hugo Bowne Anderson: That’s incredibly cool. when we’re thinking about Python in the browser using PyDart in the backend, PyScript comes to mind as well. So when would you suggest people play with one or the other?
[47:38] Freddy Boulton: I’m going to be honest with you, I’m not the biggest expert in what the state of Python in the browser is. But yeah, so I don’t know. I’ll get back to you. Yeah,
[47:52] Hugo Bowne Anderson: cool. Appreciate it. The initial question Matthew Miller had, though, was in Gradio Lite, is it possible to use Python packages that need to make web or REST API requests? If so, are there any examples?
[48:02] Freddy Boulton: There’s no examples off the top of my head. It is possible. There’s a very specific way to do it. You can’t use requests, or I think you can use requests, but also there’s like in the Pyodide docs, there’s a specific section, if I recall correctly, about how to make requests correctly from within Python. So I will dig that up and then put it in Discord yet, but it is possible.
[48:30] Hugo Bowne Anderson: Appreciate that, Freddie. And no promises, but my spidey sense says if you join the Hugging Face Discord and did a search for this type of question, someone else may have asked it before. Seems like the type of thing people would be very interested in. Matthew Miller also has another question, which I’m, is there a way to do more advanced table reading? like AG grid, I don’t know what that Manzoor, or similar that has more advanced native column filtering input output.
[48:59] Hugo Bowne Anderson: I find the existing data frame component a bit limiting, would be very helpful for building more advanced web apps that could be used for things like data labeling, for example.
[49:07] Freddy Boulton: Yeah, so yeah, I don’t know what AG table is. I did, like, we are sort of like, you know, like, We are trying to make the data frame component better. Like, it’s pretty flexible. Like, pretty much, like, anything. It’ll basically, like, visualize any kind of, like, Pandas data frame for you. So, like, even if you’ve, like, applied colors and formatting and stuff in Python, like, the JavaScript will know how to display that correctly. So, it’ll apply the same colors and all that kind of stuff.
[49:39] Freddy Boulton: But, yeah, like, it doesn’t do, like, a lot of, like, high-tech filtering or, like, it’ll sort, but it won’t. filter for you, like it won’t do that stuff. That would be like a great testing component if you feel motivated to do that. But you know, if you don’t want to start from scratch. There is something I want to show you that’s kind of related to that, which is the leaderboard component. So this is something that we did.
[50:09] Freddy Boulton: This is something that we built a couple weeks ago because the OpenLLM leaderboard was running all of the processing, all of the logic for filtering and subsetting and all that stuff in the backend. It was introducing a lot of latency. So we built this custom leaderboard component to be able to do all the data processing. entirely in the client. So it goes a lot faster. So it’ll filter very quickly. It’ll add columns very quickly, all that stuff. So the OpenLM leaderboard is now using this custom component because it’s a lot more performant.
[50:45] Freddy Boulton: It’s doing all the logic on the client side now. So if you wanted to, I think it’d be really cool if you could build whatever it is that you have in mind as a custom component. And you could also file an issue so that someone else could you know.
[50:59] Freddy Boulton: to propose ideas of how to best do that with radio uh but yeah but like we’re we are starting to think about that we are trying to go in that direction we just haven’t haven’t gotten there yet awesome thanks freddie um we’ve got a few minutes left and um we haven’t got to all the questions but people feel free um
[51:15] Hugo Bowne Anderson: for the ones we haven’t got to if you want to ask them in in discord we can we can get to them there um i’m just interested in what what you’re most excited about working on at the moment if there’s anything you want to show us or or tell us what’s what’s the next three months or six months or the future holds for you?
[51:33] Freddy Boulton: For sure. For sure. I mean, I think, you know, like one of the things that I’m personally really excited about is like the, the agent stuff that, you know, someone asked a question about earlier. Like I’m really glad that they asked that question because like there’s something that we were working on like literally last week. Right. So I think that’s, that’s definitely going to hit radio like soon, like probably like in the next two weeks or so. So yeah.
[51:53] Freddy Boulton: So basically like, you know, be ready to like, you know, build really slick agent demos, better integration into all these API providers, all that stuff from within Gradio. So we’re actively thinking about how to make LLMs even easier with Gradio. So I think that’s one really cool thing. And then earlier someone asked about a GPT-4-0 type demo where you’re constantly talking with it and it streams all the data, all the results back to you. We are thinking about how to do that with Gradio. Right.
[52:25] Freddy Boulton: So A couple months ago, we were playing around with WebRTC to see how we could basically do all the radio streaming for audio or video with WebRTC. And some of the preliminary demos that we built are really cool. They’re basically real-time machine learning, image processing, audio processing, all within with Python. So that’s really cool. So, yeah, I think that’s pretty cool.
[52:52] Freddy Boulton: you know jury’s on whether or not we’ll use webrtc or we’ll use like some other technology but i think like being able to like stream really really quickly um you know from your client to the gradio server and back i think it’s something really exciting that that we’re working on so yeah we definitely have that sort of gpt pro type demo like as like a north star that we’re we’re working on um and then like the other cool thing that gonna hit gradio really soon um is sort of more declarative UI.
[53:21] Freddy Boulton: So I think this is actually really cool. This is, it’s something that, oh, sorry, I need to do that. It’s something that we’re working on pretty, like right now, and we’re gonna release it probably next week or, you know, next week at the latest. But it’s, you know, we get, we keep getting questions around like, how can you create Gradio demos?
[53:45] Freddy Boulton: that are like in a way like non-deterministic right like you want to have like a variable number of text boxes you want to like have a variable number of you know like events and all that stuff uh we’re introducing this thing called gr.render um so that like you know like depending on this like arbitrary count variable you can create like that many number of text boxes that function similarly to like any other radio text box you can like create like click events and all or like submit events for all these tech boxes and then you
[54:13] Freddy Boulton: have like a really cool like declarative ui um in radio so i think it’s really cool like the i’ll try to find like an example of that like this is like um it’s gonna hit radio like probably next week uh but this is like really cool like sort of being able to do like really um like dynamic rendering of like all these different components um i think it’s it that’s really exciting so i’d say don’t look the three main things that at least i’m looking forward to um in the in the next months but you
[54:42] Freddy Boulton: know the Gradio team is working a lot, right? So like I didn’t, that doesn’t cover the clients, the clients are super exciting too, right? So like if you want to, you know, the hottest models like always land on Hugging Face first and like the way to use them programmatically is the Gradio client basically. Because like you can like interface with whatever Gradio server is running that model from anywhere. So I think that’s really exciting. And Gradio Lite is also super exciting. So yeah, there’s a lot of exciting stuff.
[55:10] Hugo Bowne Anderson: Yeah, that’s three incredibly exciting things, any one of which is kind of mind-blowing, to be honest. So what a time to be alive. We do have one other question. Someone’s wondering, the first question is, can we have an LLM that is fine-tuned with the latest Gradio docs? So I think that means maybe in…
[55:29] Hugo Bowne Anderson: the dog because maybe in the hf every time they use chat gbt anthropic any llm they get gradio code that’s old and deprecated yeah no that’s uh if you want to build it like that would be so cool like we are we’re actually talking about like doing
[55:45] Freddy Boulton: that ourselves like i mean i’m actually enrolled in this course and the reason i enrolled in the course because i want to do that so uh but by all means please do that before me like that i would i will help you um that would be really cool Yeah, because we’re seeing that like, like, like they’re using like, really old video API’s, or they just hallucinate some stuff that like was never valid radio code.
[56:04] Freddy Boulton: So yeah, so I would I would love to have a radio LLN that’s running on the website that can or on discord, that people can ask questions to, you know, to unblock themselves. I think that’d be that’d be huge.
[56:17] Hugo Bowne Anderson: That would be so cool. Look, I’d like to thank everyone for joining. We had, you know, around 100 people here the whole time.
[56:24] Hugo Bowne Anderson: um with virtually no drop-off which is which is incredible um which is testament to um how exciting um everything you talked about is is freddy um but most importantly thank you for sharing your wisdom everything you’re doing on on the edge of all of this really really exciting stuff um and if anyone has any other questions um freddy you can be around every now and then to chat in discord yeah absolutely i mean i’m on discord uh pretty much all day like so yeah so feel free to drop questions yeah well someone will answer for
[56:56] Hugo Bowne Anderson: sure yeah fantastic all right well thanks once again everyone um and see you in the next next workshop um and thanks freddie as well yeah absolutely thanks everyone really appreciate the questions um
[57:10] Freddy Boulton: cool thanks so much man that was really pretty awesome awesome yeah thanks so much for the questions i mean i was a little worried that no one would show up this is memorial day but um i’m glad people showed up and had good questions
[57:21] Hugo Bowne Anderson: There were people tuning in from India at 4 a.m. and stuff as well.
[57:27] Freddy Boulton: That’s insane. Yeah, that’s super exciting. Yeah, I mean, like testament to you guys as well for building such an engaging course that everyone is loving. I’m loving it.