Commit Graph

5285 Commits

Author SHA1 Message Date
Abubakar Abid
e6198752c6
Adds missing components to gradio client serializing's component mapping (#4167)
* add missing serialization

* format

* update release note format

* update release note format

* fix test
2023-05-11 11:33:14 -05:00
Freddy Boulton
c4a884a9a7
Fix flaky interface test (#4168)
* Fix test

* Lint

* Fix vs code lint
2023-05-11 10:53:45 -05:00
Yuichiro Tachibana (Tsuchiya)
b169896a9a
Fix the wildcard in .editorconfig to match files in nested directories (#4165)
* Fix the wildcard in .editorconfig to match files in nested directories

* Remove a wrong whitespace in a brace expansion notation in .editorconfig

---------

Co-authored-by: pngwn <hello@pngwn.io>
2023-05-11 10:29:28 -04:00
Abubakar Abid
253410c78d
simplify format of changelog (#4163) 2023-05-11 08:11:49 -05:00
Yuichiro Tachibana (Tsuchiya)
29d3d81e54
Fix the prettier.ignorePath field in the VSCode workspace settings (#4164)
Co-authored-by: pngwn <hello@pngwn.io>
2023-05-11 13:58:44 +01:00
Yuichiro Tachibana (Tsuchiya)
3b744a5386
Update .prettierignore adding client/js/dist and .venv (#4160) 2023-05-11 13:43:53 +01:00
Freddy Boulton
3227a9b703
Fix api info for File component (#4153)
* Fix output file type info

* Fix example inputs

* CHANGELOG

* Update client

* Add test

* Bump version

* Bump min client version
2023-05-10 19:52:07 -04:00
Abubakar Abid
ccdaac1395
Record username when flagging (#4135)
* record username

* fix

* changelog fix

* format

* fix hf saver

* fix deserialization

* fixes
2023-05-10 14:49:49 -05:00
Abubakar Abid
2cf13a1c69
Fix isssue with running with nginx (#4133)
* nginx-root

* fix

* ability to set root path

* removed root

* removed root

* fix

* changelog

* Update gradio/routes.py

Co-authored-by: aliabid94 <aabid94@gmail.com>

* Update gradio/routes.py

Co-authored-by: aliabid94 <aabid94@gmail.com>

---------

Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-05-10 14:36:51 -05:00
Freddy Boulton
5e2c3c9ed6
Fix python client test (#4138)
* Fix python client test

* CHANGELOG

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-10 10:13:52 -05:00
Ali Abdalla
8e19e894a9
Fix website build issue (#4142)
* upgrade pnpm

* changelgo
2023-05-10 18:31:44 +04:00
Abubakar Abid
35f6c78402
changelog (#4136) 2023-05-10 00:58:05 -05:00
Yuichiro Tachibana (Tsuchiya)
d2314f9442
Fix dev docs (#4132)
* Move .config/README.md to js/README.md

* Link js/README.md from CONTRIBUTING.md

* Update CHANGELOG.md

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-09 16:38:38 -05:00
Ali Abdalla
128668d88a
Fix create version docs action (#4130)
* define version instead of upgrading

* add sleep

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-09 23:52:13 +04:00
github-actions[bot]
030a49b9eb
New Version Docs (#4131)
* [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-09 23:16:07 +04:00
Freddy Boulton
a65c4b5927
Bumpt client version (#4125) 2023-05-09 12:53:33 -04:00
Abubakar Abid
d7ec58126a
release (#4116) 2023-05-09 10:50:05 -05:00
Freddy Boulton
96c17a7470
Add support for async generators (#3821)
* Add impl + unit test

* CHANGELOG

* Lint

* Type check

* Remove print

* Fix tests

* revert change

* Lint

* formatting

* Fix test

* Lint

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-05-08 23:21:47 -05:00
Abubakar Abid
f1703d5f53
Fixes to view API page (#4112)
* logo

* fix for new info and logo path

* changelog

* remove example_input from returns

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-05-08 22:35:46 -05:00
aliabid94
a3a34697ad
Fix then logic to work after failures (#4115)
* change

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-08 22:16:54 -05:00
space-nuko
fab7642414
Fix slider released event not triggering when released on mobile (#4098)
* Fix slider released event not triggering when released on mobile

* Update CHANGELOG

* fix range test

* retrigger

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-08 21:10:26 -05:00
aliabid94
5ef0bfeefc
Allow textbox / number submits to trigger Interface submit (#4090)
* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-08 20:51:05 -05:00
aliabid94
1910df10d9
Upload audio ios (#4071)
* changes

* changes

* change

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-08 20:35:52 -05:00
Freddy Boulton
c7f4a88150
Dont send request to /info if version before 3.28.3 (#4109)
* Add code

* Lint

* CHANGELOG

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-08 17:18:28 -04:00
Abubakar Abid
dccf68d914
Removing "State" from view API info (#4107)
* wip pr

* update client version

* update space fetcher

* changelog, workflow

* fix not flaky tests

* lint

* v2
2023-05-08 15:47:40 -05:00
Abubakar Abid
bebfb72b35
Misc file and docs fixes (#4086)
* uvicorn version

* uvicorn version

* changes

* guides

* guide

* changelog

* typo

* typo

* Update guides/04_integrating-other-frameworks/01_using-hugging-face-integrations.md

* chinese lang

* rename

* Update guides/04_integrating-other-frameworks/01_using-hugging-face-integrations.md

* Update guides/03_building-with-blocks/04_custom-CSS-and-JS.md

Co-authored-by: aliabid94 <aabid94@gmail.com>

* address review

* simplify section

---------

Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-05-07 08:48:24 -05:00
Abubakar Abid
de7b35adfb
Theme builder fixes (#4080)
* theme-builder-fixes

* theme-builder-fixes

* fix expand issue

* changes

* Update gradio/themes/builder_app.py

* changelog

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-05-06 08:15:41 -05:00
aliabid94
4c314c3d88
Keep hidden Accordion content in DOM (#4073)
* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-06 08:00:05 -05:00
Freddy Boulton
b66ecff671
[WIP] Language Agnostic Typing in /info route (#4039)
* First commit

* All serializers

* Remove output type

* Add route

* Format json

* Modify dropdown and slider choices

* Fix impl

* Lint

* Add tests

* Fix lint

* remove breakpoint

* Tests passing locally

* Format code

* Address comments

* Use union + fix tests

* handle multiple file case

* Add serializer to info payload

* lint

* Add to CHANGELOG

* grc version

* requirements

* fix test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-05 19:10:34 -05:00
Aarni Koskela
d1853625fd
More Ruff rules (#4038)
* Bump ruff to 0.0.264

* Enable Ruff Naming rules and fix most errors

* Move `clean_html` to utils (to fix an N lint error)

* Changelog

* Clean up possibly leaking file handles

* Enable and autofix Ruff SIM

* Fix remaining Ruff SIMs

* Enable and autofix Ruff UP issues

* Fix misordered import from #4048

* Fix bare except from #4048

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-04 21:54:23 -05:00
Freddy Boulton
71f1e654ab
Fix bug where functions with type hints caused errors (#4068)
* Fix + test

* CHANGELOG

* Update test/test_utils.py

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

* Update gradio/utils.py

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

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-04 21:38:41 -05:00
aliabid94
f763912bc8
Empty gallery fix (#4072)
* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-04 19:03:11 -05:00
aliabid94
1871c8eb3c
Soft theme fix (#4070)
* fix

* fix

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-04 17:50:11 -05:00
github-actions[bot]
029ded370f
New Version Docs (#4069)
* [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-05 01:30:43 +04:00
Abubakar Abid
0847901c89
changelog (#4064) 2023-05-04 11:52:49 -05:00
github-actions[bot]
5d0b0da714
[create-pull-request] automated change (#4059)
Co-authored-by: aliabid94 <aliabid94@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-05-04 10:46:08 -05:00
Dawood Khan
0f4a922444
Fixes issue with indentation in code field with streaming (#4043)
* indent fix

* fix

* changelog

* fix overflowing gutter and dark mode base color (#4051)

* 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

* Chatbot code syntax highlighting (#4048)

* first pass

* fixes

* more fixes

* remove breaks

* format

* version

* pr fixes

* changelog

* test fix

* background color

* format

* revert test fix

* changes

* changes

* test

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>

* fix

* fix test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-05-04 10:35:34 -05:00
Dawood Khan
c06901ed05
Chatbot code syntax highlighting (#4048)
* first pass

* fixes

* more fixes

* remove breaks

* format

* version

* pr fixes

* changelog

* test fix

* background color

* format

* revert test fix

* changes

* changes

* test

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-05-04 03:28:39 -05:00
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