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
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