Skip to content

v2.6.0

Compare
Choose a tag to compare
@aliabd aliabd released this 23 Dec 17:53
· 1921 commits to master since this release

Here's what's new in 2.6.0:

1. Integration with transformers pipeline πŸ› οΈ

The Interface class now has method from_pipeline which can wrap a Hugging Face transformers Pipeline into an interface ready for launch.
Here's an example:

import gradio as gr
import transformers 

p = transformers.pipeline("automatic-speech-recognition") 
io = gr.Interface.from_pipeline(p) 
io.launch() 

will produce

Screen Shot 2021-12-23 at 6 59 58 PM

2. Native Embeddings for Spaces Demos πŸ–₯️

You can now directly embed any gradio interface hosted on Spaces into a website. You just need to add this to the HTML file:

<script defer="defer" id="gradio-library" src="www.gradio.app/gradio_static/bundle.js">
<script>
    launchGradioFromSpaces("spaces/path", "#div_name")
</script>

For example: launchGradioFromSpaces("abidlabs/Draw", "#demo_div")

will produce

Screen Shot 2021-12-23 at 7 13 36 PM

3. Our website now builds from this repo πŸš€

Everything on our landing page now builds from /website, so feel free to contribute to docs, guides or anywhere else!

Screen Shot 2021-12-23 at 7 35 14 PM

4. Other Fixes and Deprecations 🩹

We made lots of fixes in this release, here are a few important ones:

  • If a port is specified using the server_port parameter, only that port will be used. server_port and server_name parameters have been moved to the launch() method and deprecated from the Interface class.
  • API docs now support authenticated interfaces and live demos pulling from interface examples.
  • Dark theme on Spaces is much better.

What's Changed

New Contributors

Full Changelog: v2.4.0...v2.6.0