Here's what's new in gradio v3.3
:
1. Iterative Outputs ⏳
You can now create an iterative output simply by having your function return a generator!
Here's (part of) an example that was used to generate the interface below it. See full code.
def predict(steps, seed):
generator = torch.manual_seed(seed)
for i in range(1,steps):
yield pipeline(generator=generator, num_inference_steps=i)["sample"][0]
GZ8OZb9FuFqloUeQ.mp4
2. Accordion Layout 🆕
This version of Gradio introduces a new layout component to Blocks: the Accordion. Wrap your elements in a neat, expandable layout that allows users to toggle them as needed.
Usage: (Read the docs)
with gr.Accordion("open up"):
# components here
3. Skops Integration 📈
Our new integration with skops allows you to load tabular classification and regression models directly from the hub.
Here's a classification example showing how quick it is to set up an interface for a model.
import gradio as gr
gr.Interface.load("models/scikit-learn/tabular-playground").launch()
Full change log below:
What's Changed
- safari fixes by @pngwn in #2138
- Fix roundedness and form borders by @aliabid94 in #2147
- Better processing of example data prior to creating dataset component by @freddyaboulton in #2128
- Show error on Connection drops by @aliabid94 in #2094
- 3.2 release! by @abidlabs in #2139
- Fixed Named API Requests by @abidlabs in #2151
- Quick Fix: Cannot upload Model3D image after clearing it by @dawoodkhan82 in #2168
- Fixed misleading log when server_name is '0.0.0.0' by @lamhoangtung in #2176
- Keep embedded PngInfo metadata by @cobryan05 in #2170
- Skops integration: Load tabular classification and regression models from the hub by @freddyaboulton in #2126
- Respect original filename when cached example files are downloaded by @freddyaboulton in #2145
- Add manual trigger to deploy to pypi by @abidlabs in #2192
- Fix bugs with gr.update by @freddyaboulton in #2157
- Make queue per app by @aliabid94 in #2193
- Preserve Labels In Interpretation Components by @freddyaboulton in #2166
- Quick Fix: Multiple file download not working by @dawoodkhan82 in #2169
- use correct MIME type for js-script file by @daspartho in #2200
- Add accordion component by @aliabid94 in #2208
New Contributors
- @lamhoangtung made their first contribution in #2176
- @cobryan05 made their first contribution in #2170
- @daspartho made their first contribution in #2200
Full Changelog: v3.2...v3.3