v2.6.0
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
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
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!
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
andserver_name
parameters have been moved to thelaunch()
method and deprecated from theInterface
class. - API docs now support authenticated interfaces and live demos pulling from interface examples.
- Dark theme on Spaces is much better.
What's Changed
- [HF Spaces] Darktheme from URL params by @cbensimon in #306
- Piping errors by @dawoodkhan82 in #308
- update test_utils by @AK391 in #307
- Ability to call() Interfaces, including those loaded from HF Hub & Spaces by @abidlabs in #303
- Editable audio by @aliabid94 in #316
- Adding API docs to all interfaces by @aliabd in #309
- Fixed video component's flagging method by @shubham-goel-zefr in #322
- Fixed node on windows; fixed label bug with HF theme by @abidlabs in #326
- updated strings so that people reach out to us via email more by @abidlabs in #329
- [WIP] inferface.py tests by @AK391 in #313
- examples can handle non-nested list if single input interface by @abidlabs in #331
- Tests for component.py, inputs.py and outputs.py by @aliabd in #330
- Expanding coverage on outputs.py by @aliabd in #334
- [HF Spaces] Adjust dark background color by @cbensimon in #336
- fixed tests to they pass on woindows Link T-6 by @abidlabs in #342
- Abidlabs/tests analytics fix by @abidlabs in #345
- fixed tests based on Ali's feedback by @abidlabs in #349
- Abidlabs/api spaces by @abidlabs in #350
- Bump jsuites from 4.6.6 to 4.9.22 in /frontend by @dependabot in #348
- Bump tar from 6.1.0 to 6.1.11 in /frontend by @dependabot in #347
- Bump tmpl from 1.0.4 to 1.0.5 in /frontend by @dependabot in #346
- interface.py new tests by @AK391 in #335
- Bump dns-packet from 1.3.1 to 1.3.4 in /frontend by @dependabot in #354
- Bump url-parse from 1.5.1 to 1.5.3 in /frontend by @dependabot in #353
- Bump ws from 6.2.1 to 6.2.2 in /frontend by @dependabot in #352
- Bump path-parse from 1.0.6 to 1.0.7 in /frontend by @dependabot in #351
- update interface.py tests by @AK391 in #356
- tests for integration and fixes bug by @AK391 in #358
- Fix comparison of "numpy" and "pil" types in Image by @BioGeek in #364
- Series working with external (T-93) by @abidlabs in #365
- change plotly to matplotlib by @discdiver in #368
- add test for capture session by @AK391 in #376
- Way to change page's tab title in interface by @charlielito in #386
- Website: WIP by @aliabid94 in #328
- Fix arbitrary file reading vulnerabilities by @haby0 in #406
- Fix url_ok check is not reaching host by @cansik in #408
- [WIP] Working on fixing issues related to server_name, server_port, and url_ok by @abidlabs in #407
- Added hers to list of female words by @fiordiconio in #415
- Bump jsuites from 4.6.6 to 4.9.28 in /frontend by @dependabot in #412
- Bump tar from 6.1.0 to 6.1.11 in /frontend by @dependabot in #411
- Bump tmpl from 1.0.4 to 1.0.5 in /frontend by @dependabot in #410
- Bump dns-packet from 1.3.1 to 1.3.4 in /frontend by @dependabot in #416
- Bump path-parse from 1.0.6 to 1.0.7 in /frontend by @dependabot in #418
- Bump url-parse from 1.5.1 to 1.5.3 in /frontend by @dependabot in #417
- Cleaning up interface.py #407 by @abidlabs in #409
- Gradio integration with
transformers
Pipelines by @abidlabs in #424 - Fixes port issue; deprecates server_port, server_name parameter by @abidlabs in #420
- remove duplicate parameter description by @un-index in #427
New Contributors
- @cbensimon made their first contribution in #306
- @AK391 made their first contribution in #307
- @shubham-goel-zefr made their first contribution in #322
- @BioGeek made their first contribution in #364
- @discdiver made their first contribution in #368
- @charlielito made their first contribution in #386
- @haby0 made their first contribution in #406
- @cansik made their first contribution in #408
- @fiordiconio made their first contribution in #415
- @un-index made their first contribution in #427
Full Changelog: v2.4.0...v2.6.0