Commit Graph

5097 Commits

Author SHA1 Message Date
Abubakar Abid
ff21ecbc25
Add ability to blocklist filepaths, ability to specify where gradio temp files are created (#4047)
* temporary file

* tests

* formatting

* rename

* added another test

* guide

* formatting

* changelog

* added custom gradio temp directory (#4053)

* added custom gradio temp directory

* Update 03_sharing-your-app.md

* rename test

* address review

* remove print
2023-05-03 17:30:38 -05:00
pngwn
35821febc3
fix overflowing gutter and dark mode base color (#4051) 2023-05-03 15:52:52 +01:00
Abubakar Abid
531f11d642
Fastapi Python Client Guide (#3892)
* fastapi guide

* changelog

* writing

* finish guide

* fix

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* Update guides/06_client-libraries/fastapi-app-with-the-gradio-client.md

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>

* dependencies

* html

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-05-02 15:54:40 -05:00
Aarni Koskela
4d629f04cc
Upgrade pyright to 1.1.305 (#4042) 2023-05-02 13:20:35 -05:00
Abubakar Abid
2be3ea1cc7
Sets matplotlib backend to agg before rendering math (#4029)
* matplotlib-agg

* fix

* context manager

* Update CHANGELOG.md

* update demos

* linting

* removed warning

* fix test

* fixes

* fix tests
2023-05-01 23:59:31 -05:00
1lint
f97b18ec9d
Allow decoding b64 string without header in processing utils (#4031)
* allow decoding b64 string without headers

* install gradio-client in edittable mode

* update GH actions

* add test for decoding headerless b64

* add test for decoding headerless b64 image

* some linting

* fix test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-01 18:24:54 -05:00
Abubakar Abid
f1ea4f79af
Allow state to be rendered multiple times (#4030)
* state render

* add test

* formatting

* changelog
2023-05-01 17:53:51 -05:00
Omar Sanseviero
398115b39a
Support new tasks with Hugging Face integration (#3887)
* Update pipelines.py

* Add pipelines that run models locally

* Fix typo

* Add new pipelines with API

* Add changelog

* changelog

* changes

* fix tests

* linting

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-05-01 12:18:58 -05:00
Lucain
b4206cd33a
Safer HuggingFaceDatasetSaver (and deprecate HuggingFaceDatasetJsonSaver) (#3973)
* Draft for a safer HuggingFaceDatasetSaver

* Rename (and replace) gr.SaferHuggingFaceDatasetSaver as gr.HuggingFaceDatasetSaver

* update changelog

* ruff

* doc

* tmp work

* merge 2 classes

* remove useless code

* adapt tests

* Update gradio/flagging.py

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

* Update CHANGELOG.md

* fix typing

* code formatting

* removed print from tests

* removing imports

* removing imports

* fix paths

* formatting

* wording

* formating

* fix tests

---------

Co-authored-by: testbot <lucainp@hf.co>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-01 11:59:41 -05:00
github-actions[bot]
d58728aef5
New Version Docs (#4027)
* [create-pull-request] automated change

* Trigger Build

---------

Co-authored-by: aliabd <aliabd@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2023-05-01 20:22:14 +04:00
Aarni Koskela
12a97746ff
Ruff update + strictening (#3979)
* Update ruff to 0.0.263

* Get rid of bare except:s

* Fix two Ruff E731s by moving expand_{color,size} to the relevant classes

* Fix Ruff E731 and some variable shadowing in theme builder

* Fix remaining Ruff E731s

* Get rid of unused Ruff ignores

* Fix ruff B904 issues (raise from)

* Fix Ruff B007: loop-control variable not used

* Fix Ruff B011 (do not assert false)

* Remove unused args and kwargs from Progress.tqdm() (spotted via Ruff B026)

* Fix mutable argument default in CheckboxGroup

* Noqa ABC-related lint warnings for Interpretable

* Add missed assert in test_queueing (ruff B015)

* Enable ruff B

* Enable ruff C and fix issues

* Add changelog

* Add UP03[012] after #3984

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-28 17:59:42 -04:00
Abubakar Abid
1f9584f9a7
Version 3.28.1 (#4009)
* changelog

* changelog

* Fix dropdown as output

---------

Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-04-28 17:43:04 -04:00
aliabid94
89dc35c97d
Fix dropdown default issue (#3996)
* change

* change

* test

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-28 14:58:22 -04:00
aliabid94
2f8b9f8b03
UI fixes for themes (#3590)
* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-28 14:31:41 -04:00
space-nuko
5c4a9b402e
Add Clear Mask button to sketch mode (#3615)
* Add Clear Mask button to sketch mode

* Update changelog

* fix bugs + change icon

* tweak

---------

Co-authored-by: pngwn <hello@pngwn.io>
2023-04-28 14:16:14 -04:00
aliabid94
8a31766a0e
Fix faded textbox on iOS / Safari (#3993)
* change

* changes

* changes

* changes

* changes

* formatting

* fix

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-28 10:53:44 -04:00
github-actions[bot]
9d3b5d7bcc
New Version Docs (#4004)
* [create-pull-request] automated change

* Trigger Build

---------

Co-authored-by: aliabd <aliabd@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2023-04-28 12:39:27 +04:00
Aarni Koskela
fa55570b71
CI: Simplify Python CI (#3982)
* CI: use actions/setup-python's native caching

* CI: don't create virtualenvs (CI is run in an isolated context anyway)

* CI: clean up extra directory-creating step

* Changelog

* Update CHANGELOG.md

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-28 02:57:44 -04:00
Abubakar Abid
847247e1dd
version (#3990) 2023-04-27 16:35:55 -04:00
Aarni Koskela
d25226f704
Use f-strings where possible (#3984)
* Use f-strings where possible

Semi-automated using ikamensh/flynt

* Update gradio/utils.py

* Update gradio/interface.py

* formatting

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-27 16:09:50 -04:00
space-nuko
30f4556927
More dropdown fixes (#3705)
* Fix several dropdown bugs

- Stop reopening when arrow is pressed
- Fix not opening when value text is clicked
- Being unable to filter in single-select mode
- Change color of filter text
- Clear filtering text when focus is lost

* Fix more dropdown issues

- Filter being focused but options not opening
- Make actions triggered on keydown instead of keyup (better responsiveness)

* Select dropdown element if exact match

* Pop last multiselect element if backspaced into

* Fix even more dropdown issues

- Override default input component up/down arrow key action
- Active option preventing arrow key movement if exact match

* Don't truncate dropdown options in X direction

* Format

* Update changelog

* Fix

* Requested changes

* changes

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-04-27 12:56:39 -04:00
Freddy Boulton
2a59ec04fa
Fix view_api bug where unnamed rotes where showing api_name instead of fn_index (#3972)
* Fix view_api bug

* Add to changelog

* Rework test
2023-04-26 18:38:46 -04:00
Aarni Koskela
37d52a753c
CI: only run backend lints once, not in all test environments (#3960)
* CI: only run backend lints once, not in all test environments

* Add needses
2023-04-26 15:41:06 -04:00
Greysuki
88a2b20997
Fix duplicate play commands in full-screen mode of Vidieo (#3968)
* fix

* changelog

* Update CHANGELOG.md

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
2023-04-26 14:33:53 -04:00
Freddy Boulton
f886045535
Use local demos for client tests (#3975)
* Fix tests

* Fix tests

* Address comments
2023-04-26 11:11:28 -04:00
Dawood Khan
ee78458c64
Fixes dropdown does not position itself at selected element when opened (#3639)
* fixes

* fix

* Update CHANGELOG.md
2023-04-25 09:12:38 -07:00
Freddy Boulton
7de41d94bb
After closing demo, reuse port if its specified (#3959)
* Reuse port when its specified after closing demo

* Add to changelog

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-25 10:07:35 -04:00
Aarni Koskela
90f25905d6
gradio.themes: get rid of useless re-exports + noqas (#3958)
* gradio.themes.utils: remove star re-exports

* gradio.themes: specify re-exports in __all__

* gradio.themes.app: import create_theme_dropdown from full module path

* Add changelog

* Yeet theme_dropdown CommitOperationAdd

* fixing broken theme path

* version

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-24 18:08:55 -07:00
Aarni Koskela
1598680376
Move Google Tag Manager code to analytics_enabled block in Blocks.svelte (#3956)
* Move Google Tag Manager code to analytics_enabled block in Blocks.svelte

* format

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-24 13:27:20 -07:00
Freddy Boulton
d835c9a816
Support gr.Progress() in python client (#3924)
* Add progress message

* CHANGELOG

* Dont use pydantic

* Docs + local test

* Add gr to requirements

* Remove editable install

* make a bit softer
2023-04-24 12:52:10 -04:00
Tyé singwa
6b854eefd4
Allow image url as ChatBot response (#3953)
* fix(chatbot): allow url as chatbot response

* chore(changelog): update changelog

* fix: update per review

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

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-24 08:45:04 -07:00
Ikko Eltociear Ashimine
4c0410579b
Fix typo in 07_other-tutorials/theming-guide.md (#3952)
* Fix typo in 07_other-tutorials/theming-guide.md

* Update CHANGELOG.md

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-24 10:01:20 -04:00
Freddy Boulton
288e6f77cf
move guide to client section (#3948) 2023-04-24 09:51:46 -04:00
January Desk
7b0f48eb2c
Fixes data updating invoke the select event (#3861)
* fix data updating invoke the `select` event

* Update CHANGELOG.md

* changes

* change

* change

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-04-23 18:33:40 -07:00
Freddy Boulton
ad2ed23ce0
Gradio and LLM agents guide (#3934)
* Add WIP guide

* Fix syntax

* Fix guide

* Fix guide
2023-04-21 17:05:58 -04:00
Tenzin
3b114cbc2b
Fixes typos (#3931)
* Fixes typos

* Update CHANGELOG.md

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-21 11:00:57 -04:00
Micky Brunetti
5e9c3b0ac8
Fix HTTP code for file request (static, assets, file) (#3895)
* Fix HTTP code for file request (static, assets, file)

* Fix bugs related to utils.abspath for symlink and unresolvale path

* Requesting a directory from the file route now returns 403
2023-04-20 15:18:33 -04:00
Greysuki
1439b72f66
UI stuck caused by the 'selected' of DataFrame not being reset (#3916)
* dataframe error fix

* changelog

* demo launch fix
2023-04-20 10:27:52 -04:00
DavG25
9d7fde4f16
Fix TypeError when Blocks outputs parameter is set to None (#3883)
* Fix TypeError when Blocks outputs parameter is set to None

* Update changelog

---------

Co-authored-by: Dawood Khan <dawoodkhan82@gmail.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-19 16:41:49 -04:00
aliabid94
ae30e5f292
Fix output image heights (#3905)
* changes

* changes

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-19 16:24:50 -04:00
Dawood Khan
c7f61599ba
Fix video not working in tab (#3891)
* fix

* fixes

* change

* Update CHANGELOG.md

* format
2023-04-19 13:12:54 -07:00
Simon Duerr
6e7abf8645
make use of gr. consistent (#3901)
* make use of gr. consistent

* add changelog

* Update CHANGELOG.md

* fix digit_classifier notebook

* lint

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-04-19 15:55:37 -04:00
January Desk
e0eea96766
Fix false positive warning in check_function_inputs_match (#3837)
* fix false positive warning of check_function_inputs_match

* apply linter

* Update CHANGELOG and add comments in test

* Lint

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-19 15:44:28 -04:00
Dawood Khan
a95f615ce8
Gallery height fix (#3830)
* gallery height fix

* fix

* changelog

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-19 12:31:44 -07:00
Abubakar Abid
7a04ebe7fd
Fix some documentation-related issues in Guides (#3903)
* client doc fixes

* simplify demo

* added guides

* chatbot guide

* notebooks

* format
2023-04-19 14:38:11 -04:00
Freddy Boulton
f81b8235c7
Fix bug multiple bokeh plots (#3896)
* Fix bug multiple bokeh plots

* CHANGELOG
2023-04-17 22:09:51 -04:00
Garrett Sutula
73ec7fb0a8
Add "ssl_verify" param to allow use of self-signed certs (#3873)
* Add "ssl_verify" param to allow use of self-signed certs

* Update changelog

* Add ssl_verify to queue.start()

* lint

* type check

* fix tests

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-17 15:24:59 -07:00
Greysuki
df7d645207
Fixed issue with old_value check in File (#3859)
* old_value check

* changelog

* fix

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-17 14:29:47 -04:00
Hyoung-Kyu Song
d8bfa63a38
theme builder example doesn't work for 3.25.0 or later (#3869)
* theme builder example doesn't work for `3.25.0` or later
Fixes #3864

* update CHANGELOG.md

* Fix import order

* Lint

* added test

* add wheel

* wheel

* wheels

* pip

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-16 03:22:45 -07:00
Ali Abdalla
69e915832a
Add DESCRIPTION.md to image_segmentation demo (#3866)
* add description.md to image_seg

* changelog
2023-04-14 21:35:25 -07:00