Commit Graph

6169 Commits

Author SHA1 Message Date
Hannah
ded5256c4a
Fix audio recording events not dispatching (#7158)
* fix audio events and add events test

* add changeset

* add changes to audio demo

* Fix e2e tests

* regenerate notebook

* formatting

* test timeout for e2e

* formatting

* remove value param from stop_recording

* formatting

* fix test

* formatting

* tweak

* test new playwright config

* skip test

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-26 18:13:27 +01:00
AbhishekKr
9949cdc850
Fix fake_diffusion demo by slider to only have int so range() doesn't fail (#7167)
Signed-off-by: AbhishekKr <abhikumar163@gmail.com>
2024-01-26 11:52:10 -05:00
thiswillbeyourgithub
f2fc1cc81a
docs: more explicit pharsing for gr.on (#7170)
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
2024-01-26 07:38:33 -08:00
PSEUDOTENSOR / Jonathan McKinney
40e6ddf911
Fixes #7136 -- gradio client iterator can hit finish event before yield all outputs (#7151) 2024-01-25 16:57:30 -08:00
pngwn
138761226a
chore: update versions (#7083)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-25 16:10:24 -08:00
Freddy Boulton
c60ad4d34a
Use Gallery as input component (#7148)
* Gallery as input

* add changeset

* Add keep_captions parameter

* revert notebooks

* fix docstring typo

* use tuples

* remove keep_captions

* Update js/app/test/gallery_component_events.spec.ts

Co-authored-by: pngwn <hello@pngwn.io>

* more precise type hint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-01-25 18:51:59 -05:00
Freddy Boulton
e7ab4063eb
Fix ParamViewer css (#7130)
* Fix ParamViewer styles

* add changeset

* Fix description background color

* ParamViewer

* bottom border

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-01-25 16:11:38 -05:00
pngwn
bc25ec78c1
Cc publish docs (#7162)
* changes

* add changeset

* lint

* tweaks

* fix guide formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-25 19:15:10 +00:00
Arian Ahmadinejad
e86ee804bf
fix: typos (#7161) 2024-01-25 19:05:55 +00:00
pngwn
6ee22dc6a8
Ensure gradio cc publish uploads the documentation space, if it exists. (#7159)
* changes

* add changeset

* lint

* tweaks

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-25 19:03:21 +00:00
cswamy
6abad53677
Added polars dataframe support with demo (#7139)
* first commit

* minor update

* working polars

* fixed. demo added.

* add changeset

* dynamic import of polars

* Fix import logic

* add changeset

* Fix lint

* Add code

* Fix code

* Add code

* remove screenshot'

* delete

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-01-25 12:56:54 -05:00
Yuichiro Tachibana (Tsuchiya)
be56c76c7b
Lite: Add the home_dir to sys.path (#7150)
* Add the `home_dir` to `sys.path`

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-25 16:43:13 +09:00
Dawood Khan
ca8753bb3d
Fixes: Chatbot crashes when given empty url following http:// or https:// (#7138)
* link fix

* add changeset

* add unit test

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 23:01:38 -05:00
Freddy Boulton
b9616528ab
Remove kwargs from template components (#7142)
* Add test

* add changeset

* Fix type hints

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-24 20:35:51 -05:00
pngwn
6654a32eba
start cc docs guide (#7080)
* start cc docs guide

* add changeset

* complete guide

* proof + edit

* tweaks

* Update .vscode/settings.json

* Update guides/05_custom-components/09_documenting-custom-components.md

* update 5 min guide

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 21:43:02 +00:00
Yuichiro Tachibana (Tsuchiya)
8c355a4784
Add ruff mock for Lite (#7133)
* Add ruff mock for Lite

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 13:10:55 -08:00
Abubakar Abid
5727b92abc
Allow buttons to take null value (#7126)
* allow buttons to take null value

* add changeset

* add story

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 13:10:00 -08:00
Abubakar Abid
7d53aa13a3
Miscellaneous doc fixes (#7131)
* fixes

* few doc fixes

* add changeset

* add changeset

* state in demo

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 11:52:23 -08:00
pngwn
125a832ab7
generate docs when running gradio cc build (#7109)
* add docs command to build

* add changeset

* add changeset

* add arg to disable

* add changeset

* tweaks

* tweaks

* tweaks

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 18:12:18 +00:00
Abubakar Abid
21a16c60e8
add params to gr.Interface and gr.ChatInterface (#7124)
* add params

* add changeset

* clear button

* changes

* changes

* simplify

* fix

* changes

* revert

* fix typing

* added params to chatinterface

* improve docstrings

* improve docstrings

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-24 09:29:38 -08:00
Abubakar Abid
45f725f8d0
un-disable output components after exception is raised (#7125)
* renable output components after exception

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-23 14:52:21 -08:00
Freddy Boulton
28e8a8a3ec
Reduce CPU usage of dev mode (#7113)
* Add code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-23 14:32:50 -05:00
Lucain
82fe73d042
Redirect with query params after oauth (#7034)
* Redirect with query params after oauth

* add changeset

* fix redirect

* align online and offline

* location

* Update gradio/oauth.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Update gradio/oauth.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-23 08:28:24 -08:00
Lucain
2cdcf4a890
Single oauth button (#7063)
* Single oauth button

* add changeset

* fix redirect if custom button value

* better js injection

* Update gradio/components/login_button.py

* add deprecation warning to docstring

* robust comparison

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-23 07:33:59 -08:00
Hannah
bc2cdc1df9
Allow download button for interactive Audio and Video components (#7104)
* allow download button for interactive audio and video components

* add changeset

* document show_download_button in video.py

* ensure show_download_button is by default true for output and false for input components

* fix component test

* tweak default val

* val tweak

* fix test and add story

* pass editable param where needed

* fix another test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Dawood Khan <dawoodkhan82@gmail.com>
2024-01-23 11:33:59 +01:00
Hannah
c35fac049a
Ensure device selection works in Audio when streaming (#7082)
* Fix microphone device access denied issue

* add changeset

* add microphone test

* create shared DeviceSelect component

* add changeset

* add e2e test

* regen notebooks

* formatting

* Fix e2e test

* formatting

* adjust controls box

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-23 10:49:29 +01:00
Freddy Boulton
cb90b3d5d6
Programmatically determine max wheel version to push to spaces (#7115)
* Add code

* remove breakpoint 🤦‍♂️

* fix lint

* add changeset

* remove breakpoint 🤦‍♂️

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-22 23:36:43 -08:00
Hannah
80f8fbf0e8
Add logic to handle non-interactive or hidden tabs (#7107)
* Refactor change_tab function to handle non-interactive or hidden tabs

* add changeset

* Refactor flashcards app UI and modify test

* Fix formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-22 23:31:59 -08:00
Hannah
13cb6af8b2
Ensure microphone devices list updates (#7045)
* Fix microphone device access denied issue

* add changeset

* add microphone test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-22 16:19:48 -08:00
Ram-Pasupula
217bfe39ca
Support audio data in np.int8 format in the gr.Audio component (#7112)
* fix#7099

Fix for Audio data cannot be converted automatically from int8 to 16-bit int format

* add changeset

* add changeset

* fix'

* processing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-22 15:23:52 -08:00
aliabid94
94aa271ab1
Improve rapid generation performance via UI throttling (#7084)
* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid@Alis-MacBook-Pro.local>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-22 11:53:19 -08:00
tsukumi
e8b2d8b2f8
Add sample rate config option to gr.Audio() (#6826)
* Fix a bug that caused the sample rate of audio to be 8000 Hz after trimming and a bug that caused volume amplification and clipping each time trimming was performed

* Fix format

* add changeset

* add sample_rate param to waveform_options

* add changeset

* set WaveformOptions defaults

* formatting

* formatting

* add changeset

* audio

* changes

* add changeset

* tweak sample rate logic + docstring

* Tweak docstring

* formatting

* linting

* type tweak

* remove redundant None check

* tweak waveform lifecycle

* fix test

---------

Co-authored-by: tsukumi <tsukumijima@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-22 10:56:48 -08:00
Hannah
44c53d9bde
Fix dropdown refocusing due to <label /> element (#7081)
* Remove extra blur causing refocus bug and add a11y tweaks

* change label to div causing reopen of dropdown

* add changeset

* Tweak label attribute

* fix browser test

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-22 10:32:27 -08:00
Freddy Boulton
ac735551bb
Run before_fn and after_fn for each generator iteration (#7029)
* Run after_fn for async generators

* add changeset

* Add code

* add changeset

* Add back before/after for generators in function_wrapper

* Rework function_wrapper

* move back to closure

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-22 12:57:57 -05:00
renovate[bot]
c17533c6b0
chore(deps): update dependency jsdom to v24 (#7097)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-21 23:52:35 -08:00
PSEUDOTENSOR / Jonathan McKinney
d72492a3cc
Fixes https://github.com/gradio-app/gradio/issues/7086 (#7091) 2024-01-21 10:53:36 -08:00
Ali Abdalla
dfe1f08ae2
Style changes to custom components gallery (#6970)
* style and other changes

* add changeset

* many changes

* smaller description and remove fallback

* better loading and add space link

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-20 03:02:56 +04:00
Monius
1718c4aeb2
add STL 3D model support (#7049)
* add STL 3D model support

* add changeset

* add model3D demo with stl support

* add NASA open-soure SOFIA STL model source

* modify model3D instead

* fix notebook

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-01-19 15:08:38 -05:00
pngwn
0a2ba5d0b0
chore: update versions (#7004)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-19 00:13:02 -05:00
Freddy Boulton
1fc8a94138
fix lint (#7075) 2024-01-18 20:49:51 -05:00
pngwn
02791f1a83
add changeset feature for autodocs (#7071)
* add changeset feature for autodocs

* Apply suggestions from code review

* add changeset feature for autodocs
2024-01-18 21:38:03 +00:00
pngwn
07d520c7a2
fix versions (#7069)
* fix versoin

* add changeset

* fix lockfile

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-18 21:01:42 +00:00
Aarni Koskela
d852d4b191
Add more reformatting commits to .git-blame-ignore-revs (#7066) 2024-01-18 20:49:31 +00:00
pngwn
3a944ed9f1
add autodocs (#7030)
* add autodocs

* remove unused code

* add changeset

* fix all of the things

* fix all of the things

* add changeset

* fix things

* tewak

* fix dep

* add ruff as dep with min version

* make output pretty + fix bugs

* tweaks

* fixes

* fix types maybe

* fix arg refs

* fix test

* fix md

* add error for version

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-18 20:47:01 +00:00
Freddy Boulton
a336508646
Fix bug preventing layout components to be used as custom components (#7050) 2024-01-19 02:02:08 +05:30
Ali Abdalla
45df1ce5d7
add imageeditor component demo (#7067) 2024-01-19 00:13:10 +04:00
aliabid94
3c3cf8618a
Fix UI freeze on rapid generators (#7055)
* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid@Alis-MacBook-Pro.local>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-18 11:50:14 -08:00
WilliamHarer
64c65d8219
Add encoding to open/writing files on the deploy_discord function (#7054)
* Update client.py

Make open discord_chat.py call encoded to utf-8

* Update client.py

Add another encoding to line 850

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-18 14:40:59 -05:00
Aarni Koskela
aaecfe54d9
Themes: fix bogus header image URL (#7060)
* Themes: fix bogus header image URL

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-18 11:25:13 -05:00
Aarni Koskela
3642b7ac93
publish: simplify twine_files code (#7058)
* publish: simplify twine_files code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-18 11:15:45 -05:00