Here's what's new in 2.9.0
:
1. Audio Streaming π€
Gradio now supports audio streaming, with a mixture of live=True
and gradio.inputs.State
.
Here's an example, the following code creates the interface below it. You can also find another demo here, and check out this Real Time Speech Recognition guide.
import gradio as gr
from transformers import pipeline
p = pipeline("automatic-speech-recognition")
def transcribe(audio, state=""):
state += p(audio)["text"] + " "
return state, state
gr.Interface(fn=transcribe,
inputs=[
gr.inputs.Audio(source="microphone", type="filepath"),
"state"],
outputs=[
"text",
"state"
],
live=True).launch()
2. New Guides βοΈ
- Creating a Chatbot
- Image Classification in Pytorch
- Image Classification In Tensorflow
- Image Classification with Vision Transformers
- Using Hugging Face Integrations (contributed by Omar Sanseviero π¦)
- Adding Rich Descriptions To Your Demo
- Using The API Docs
- Real Time Speech Recognition
3. API Docs Fixes π
We made a few updates to our interface-specific API docs. You can read more about how to use them here.
- Sample inputs will now be serialized correctly if pulled from examples. Fixes: #552
- New related methods section that shows gradio helper functions for converting to the correct file type.
- Added a copy button for code and styling that matches our website.
What's Changed
- Add zh-cn translation by @walsvid in #676
- Create hi.json by @yesdeepakmittal in #678
- Add Polish translation by @niemiaszek in #685
- Russian language support by @abaranovskis-redsamurai in #687
- Create tr.json by @asimokby in #683
- Lithuanian language support by @abaranovskis-redsamurai in #688
- Create fa.json by @Sk7w4tch3r in #684
- Updated chatbot-related docs and guide to reflect the new Chatbot component by @abidlabs in #677
- added ssl_keyfile_password by @abidlabs in #691
- Create ja.json by @osushiski in #695
- 2.8.2 by @abidlabs in #698
- Turkish translate improvement by @FarukOzderim in #702
- Switched from
json
toorjson
by @abidlabs in #710 - Tips fix by @abidlabs in #712
- handle input number values correctly by @pngwn in #716
- Restore flagging options by @aliabid94 in #715
- Add Code Snippet Part to the Bug Report by @FarukOzderim in #717
- fix an small error by @FarukOzderim in #719
- Convert all areas of bug report to markdown by @FarukOzderim in #720
- Make Bug Report screenshot area image pastable by @FarukOzderim in #721
- Cancel tests with updates by @FarukOzderim in #718
- fix file upload issues by @aliabid94 in #714
- ensure footer links open in new tab when embedded by @pngwn in #725
- ensure colormap colours are rgba format by @pngwn in #724
- Issue 693: Video component is flipped horizontally by @dawoodkhan82 in #726
- interpretation fix by @aliabid94 in #728
- Double bug fix by @FarukOzderim in #739
- release 2.8.5 by @abidlabs in #742
- Added Tamil Language Support by @amrrs in #748
- small fix to start_server docstring & added a test by @abidlabs in #747
- updated scripts to use pnpm and removed outdated readme by @abidlabs in #746
- Update first launch commands to deliver the usage of ";" and app, pat⦠by @FarukOzderim in #752
- Update The Docs on Launch by @FarukOzderim in #755
- Gradio Blocks [WIP] by @aliabid94 in #590
- [hotfix] fixed loading from spaces by @abidlabs in #760
- Writing 3 Image-Related Guides by @abidlabs in #749
- small fix to image guides by @abidlabs in #762
- fixed twitter image tag by @aliabd in #763
- updated PyPi version to 2.8.6 by @abidlabs in #766
- move is_space to launch() to allow blocks to launch() by @abidlabs in #771
- updated PyPi version to 2.8.7 by @abidlabs in #772
- Added pydantic data models for all requests by @abidlabs in #782
- Rewrite state to be backend-based by @abidlabs in #769
- Fixing issues by @aliabid94 in #774
- More fixes by @aliabid94 in #788
- Add Hub integrations Guide by @osanseviero in #773
- Guides stylistic changes by @aliabd in #792
- Guides: remove duplicate list marker by @aliabd in #793
- Add getting started to guides page by @aliabd in #794
- hotfix for
PredictBody
issue by @abidlabs in #795 - updated PyPi version to 2.8.9 by @abidlabs in #796
- Update codecov.yml by @abidlabs in #798
- API Docs Fixes by @aliabd in #787
- Sanitize flagging inputs before writing to csv by @abidlabs in #817
- Blocks Events by @FarukOzderim in #758
- Full height gradio app by @aliabid94 in #828
- Fixes to examples; use builtin csv sanitization by @aliabid94 in #827
- fix line count by @aliabid94 in #831
- restore typography by @aliabid94 in #832
- version upgrade 2.8.11 by @aliabid94 in #833
- Component label fixes by @abidlabs in #826
- description width fix by @aliabid94 in #836
- add pipeline support for token classification by @dawoodkhan82 in #845
- 2.8.13 release by @abidlabs in #846
- New guides by @aliabd in #822
- Adding custom css kwarg directly to a component [WIP] by @aliabid94 in #811
- [Spaces] Cleaner hf.space URLs by @julien-c in #872
- updated PyPi version to 2.8.14 by @abidlabs in #876
- Streaming audio by @aliabid94 in #800
- updated PyPi version to 2.9.0 by @abidlabs in #903
New Contributors
- @walsvid made their first contribution in #676
- @yesdeepakmittal made their first contribution in #678
- @niemiaszek made their first contribution in #685
- @abaranovskis-redsamurai made their first contribution in #687
- @asimokby made their first contribution in #683
- @Sk7w4tch3r made their first contribution in #684
- @osushiski made their first contribution in #695
- @amrrs made their first contribution in #748
- @osanseviero made their first contribution in #773
Full Changelog: v2.8.1...v2.9.0