Building Chatbots apps just got wayyy easier: announcing the new π²ππππΈππππππππ class π
The *fastest* way to build to build a Chatbot UI in Python -- including streaming, undo/retry, API, all out of the box!
Let's take a look at a few examples...
The π²ππππΈππππππππ only has 1 required parameter: a function that takes in:
- an input message (string)
- a history (list of list of strings)
and returns:
- a response (string)
Here's a toy example: (for the example above!)
The π²ππππΈππππππππ class works beautifully with @langchain classes
Here's a complete example querying GPT3.5 in 19 lines of code
To add streaming, just use a generator (π’ππππ) instead of a regular function (ππππππ)
Of course, you can customize it a lot more by adding examples, title/description, buttons (but you can get a fully-functioning chatbot without any of these!)
You also get a dedicated, easy-to-use API endpoint:
Gradio 3.7 is out! Everything that is new in 3.7 π½
1. Gradio now supports *batched* function. You can specify a batch size and Gradio will automatically batch incoming requests so that your demo runs on a lot faster on Spaces!
2. A new upload() event for Video, Audio, Image, and File components:
Excited to release 3 big features as part of ππππππ πΉ.πΉ π§‘
1. Iterative outputs: you can now `yield` a sequence of outputs and they will show up sequentially in your Gradio demo:
2. The ππππππ.π°ππππππππ class, which allows you to toggle on/off the visibility of components (think advanced options) in your demo very easily:
3. Loading Tabular Models from the @huggingface Hub:
Our integration with skops allows you to load tabular classification/regression models from the hub:
Now it's time for our favorite part of the Blocks Party: awarding the top machine learning demos π
We had more than 50 incredibly creative and complex demos, built entirely in Pythonπ«
Here are the top 5, as voted by your likes... π§‘
In 5th place, with 22 likes, is: StyleGAN-NADA π₯³
Built by @RinonGalt, he demo allows you to edit specific attributes in your face, and generate a new picture with specific styles turned on or off. It's scary good!
In 4th place, with 24 likes, is: GPT-J Poetry Illustrator π₯³
Built by @yvrjsharma, the demo writes a poem & illustrates it, from a SINGLE word that you give it. A really great example of mixing different machine learning models together like legos!