6480 Commits

Author SHA1 Message Date
pngwn
b561a27816
chore: update versions (#7914) @gradio/tabitem@0.2.5 @gradio/annotatedimage@0.5.11 @gradio/app@1.31.0 @gradio/atoms@0.6.2 @gradio/audio@0.9.11 @gradio/box@0.1.13 @gradio/button@0.2.30 @gradio/chatbot@0.8.2 @gradio/checkbox@0.2.14 @gradio/checkboxgroup@0.4.8 @gradio/client@0.15.1 @gradio/code@0.5.11 @gradio/colorpicker@0.2.14 @gradio/dataframe@0.6.12 @gradio/dataset@0.1.30 @gradio/downloadbutton@0.1.7 @gradio/dropdown@0.6.6 @gradio/fallback@0.2.14 @gradio/file@0.5.11 @gradio/fileexplorer@0.3.31 @gradio/form@0.1.13 @gradio/gallery@0.8.7 @gradio/highlightedtext@0.4.14 @gradio/html@0.1.14 @gradio/image@0.9.11 @gradio/imageeditor@0.4.11 @gradio/json@0.1.14 @gradio/label@0.2.14 @gradio/lite@4.26.0 @gradio/markdown@0.6.9 @gradio/model3d@0.8.10 @gradio/multimodaltextbox@0.2.4 @gradio/number@0.3.14 @gradio/paramviewer@0.4.7 @gradio/plot@0.3.6 @gradio/radio@0.4.9 @gradio/simpledropdown@0.1.14 @gradio/simpleimage@0.3.11 @gradio/simpletextbox@0.1.14 @gradio/slider@0.3.2 @gradio/statustracker@0.4.11 @gradio/accordion@0.3.8 @gradio/tabs@0.2.5 @gradio/textbox@0.4.15 @gradio/theme@0.2.1 @gradio/tootils@0.2.7 @gradio/upload@0.8.4 @gradio/uploadbutton@0.5.7 @gradio/utils@0.3.1 @gradio/video@0.6.11 gradio@4.26.0 gradio_client@0.15.1 gradio_test@0.3.11 website@0.26.0 2024-04-08 20:07:24 +01:00
Scott Davidson
1a7851c512
Fix handling of single font name in theme (#7967)
* Fix handling of single font name in theme

Previous check failed because `str` is an instance of Iterable so was never correctly wrapped in `[...]`. Instead, providing a single font such as "Arial" would result in a font list of "A, r, i, a, l" in the bundled CSS.

* Handle single fonts.Font instance correctly

* add changeset

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abid <aliabid94@gmail.com>
2024-04-08 11:52:56 -07:00
aliabid94
7c9a964ac6
Fix programmatic tab selection (#7916)
* changes

* changes

* add changeset

* changes

* add changeset

* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-04-08 11:34:25 -07:00
Hannah
057d171c71
Correctly handle device selection in Image and ImageEditor (#7754)
* move on:change to <select>

* add changeset

* move device logic to separate file + fix safari incompatability

* improve selected logic

* add stream_utils unit tests

* refactor default device logic

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-08 19:20:47 +01:00
Ihtsham Shafiq
328325a7ad
style changes for gradio website docs navbar (#7945)
* style changes for navbar items and menu bar button

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-04-08 10:33:00 -07:00
renovate[bot]
f3f60dafb5
Update actionsdesk/lfs-warning action to v3.3 (#7937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-08 10:13:44 -07:00
renovate[bot]
aeb9129110
Update dependency @testing-library/dom to v10 (#7962)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-08 10:13:23 -07:00
pngwn
1eb4c20120
ensure kwargs are always in sync across the whole application (#7963)
* ensure kwargs are always in sync across the whole application

* add changeset

* fix test

* update accordion test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-08 18:12:14 +01:00
Dawood Khan
be46ab1213
ensure entire dropdown is clickable (#7918)
* dropdown click fix

* add changeset

* add changeset

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-08 13:06:14 -04:00
WH-Yoshi
bad383645e
Adding hint list[list] for example parameter (#7966)
* Adding hint list[list] for example parameter

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-08 16:44:32 +00:00
Freddy Boulton
eae97c29ce
Fix task bug in python 3.9 (#7961) 2024-04-08 07:59:53 -07:00
Freddy Boulton
b78129d90f
Use asyncio.Event to stop stream in heartbeat route (#7932) 2024-04-05 11:57:49 -07:00
Alfiya
f2a1a859ae
Clarify the streaming response documentation (#7924)
* Clarify the streaming response documentation

You cannot simply yield one new token at a time, you have to yield the new full response.

* Clarify streaming chatbot instructions

* Clarify streaming chatbots
2024-04-05 11:54:39 -04:00
Abubakar Abid
8250a1a0df
Handle the case of multiple headers when constructing root url (#7938)
* handle the case of multiple headers

* lint

* add changeset

* Update gradio/route_utils.py

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-05 02:35:12 +00:00
Abubakar Abid
919afffcee
Adds a Guide on deploying Gradio apps with Docker (#7935)
* finish guide

* more informative exception

* add changeset

* add dockerfile to prism languages

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-04-04 19:23:23 -07:00
aliabid94
b165193902
Restore Markdown formatting for Chatbots, MarkdownCode (#7936)
* changes

* add changeset

* changes

* add changeset

* changes

* changes

* changes

* changes

* add changeset

* chages

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-04 15:04:46 -07:00
aliabid94
9666854790
Fixes streaming event race condition (#7926)
* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-04 12:39:44 -07:00
Ali Abdalla
b43055b297
Lite playground design changes (#7811)
* prevent new line on cmd+enter shortcut

* add copy button

* add download button

* better font sizing and align editor buttons

* button colors and header positioning

* add layout attribute

* height issue

* border fix

* overflow

* add changeset

* tests

* tweaks to index

* fix formatting in index.html

* fix event listener

* better alignment on header

* fix padding on code editor buttonsm

* add dark mode

* formatting

* fix heights issues

* add to guide

* shared worker and small fix

* Update guides/08_gradio-clients-and-lite/gradio-lite.md about SharedWorker mode (#7923)

* layout edit in guide

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
2024-04-04 04:38:12 -07:00
Freddy Boulton
a4782f7a09
Allow displaying gr.Code examples by their filename if value is a tuple (#7912)
* Add code

* add changeset

* add changeset

* Only display filename

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-04 00:38:55 +00:00
Bocheng Zou
867ff16cd4
Trigger the "clear" event of Image Editor (#7817) 2024-04-03 23:45:59 +01:00
Abubakar Abid
2bae1cfbd4
Adds an "API Recorder" to the view API page, some internal methods have been made async (#7850)
* changes

* code recorder

* api docs

* add changeset

* changes

* change

* add changeset

* add changeset

* changes

* fixes

* format

* changes

* fix

* add changeset

* rename

* api recorder

* docs

* changes for pr

* fix

* async-ify

* add changeset

* fix typing

* fixes

* fix test/test_blocks

* fix more tests

* fix test

* add changeset

* fix more tests

* add async version

* make 2 separate functions

* format

* fix

* format

* fix tests

* move resource

* changes

* fix cache

* lite fixes

* make lazy cache async

* fix

* fix

* flaky

* replace null with None

* fixes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-03 14:28:06 -07:00
Freddy Boulton
efd9524508
Fix gr.CheckboxGroup change event (#7915) 2024-04-03 07:19:58 -07:00
Shubham raj
b729f10321
Bugfix: Fix color and size keys in theme builder app (#7756)
* Bugfix: Update color and size keys in theme builder app

* add changeset

* add changeset

* changes

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabid94 <aabid94@gmail.com>
Co-authored-by: Ali Abid <aliabid94@gmail.com>
2024-04-02 21:09:05 +00:00
pngwn
bbdbd28453
chore: update versions (#7871)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@gradio/annotatedimage@0.5.10 @gradio/app@1.30.1 @gradio/audio@0.9.10 @gradio/button@0.2.29 @gradio/chatbot@0.8.1 @gradio/client@0.15.0 @gradio/code@0.5.10 @gradio/dataframe@0.6.11 @gradio/dataset@0.1.29 @gradio/downloadbutton@0.1.6 @gradio/file@0.5.10 @gradio/fileexplorer@0.3.30 @gradio/gallery@0.8.6 @gradio/image@0.9.10 @gradio/imageeditor@0.4.10 @gradio/lite@4.25.0 @gradio/model3d@0.8.9 @gradio/multimodaltextbox@0.2.3 @gradio/simpleimage@0.3.10 @gradio/upload@0.8.3 @gradio/uploadbutton@0.5.6 @gradio/video@0.6.10 gradio@4.25.0 gradio_client@0.15.0 website@0.25.2
2024-04-02 13:33:48 -04:00
Yuichiro Tachibana (Tsuchiya)
173c966866
Restore kitchen_sink test in the Lite E2E (#7904) 2024-04-02 23:43:59 +09:00
Freddy Boulton
6a4bf7abe2
Delete user state when they close the tab. Add an unload event for the demo and a delete_callback on gr.State to let developers control how resources are cleaned up (#7829)
* Delete state

* add changeset

* Delete state

* WIP

* Add load event

* Working ttl

* unload e2e test

* Clean up

* add changeset

* Fix notebook

* add changeset

* Connect to heartbeat in python client

* 15 second heartbeat

* Demo for unload

* Add notebook

* add changeset

* Fix docs

* revert demo changes

* Add docstrings

* lint 🙄

* Edit

* handle shutdown issue

* state comments

* client test

* Fix:

* Fix e2e test

* 3.11 incompatibility

* delete after one hour

* lint + highlight

* Update .changeset/better-tires-shave.md

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

* Update .changeset/better-tires-shave.md

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-04-01 18:31:56 -04:00
Ikko Eltociear Ashimine
83010a290a
fix typo in ci.md (#7894)
programatically -> programmatically
2024-04-01 11:08:56 -04:00
aliabid94
5e66e01abc
Fix audio streaming out (#7881)
* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-01 02:25:16 -07:00
Abubakar Abid
024b44c553
Add support for lazy caching of examples, as well as add GRADIO_CACHE_EXAMPLES env variable (#7863)
* lazy cache

* lazy cache

* add changeset

* changes

* changes

* helpers

* revert

* changes

* changes

* bash scriipt

* internal

* changes

* check

* setup

* fix

* lint

* add changeset

* revert

* fix

* fix test

* add changeset

* partial fix

* flaky

* lint

* change test

* add changeset

* change default behavior, add env

* set env correctly

* fixes

* format

* don't block event loop

* changes:

* get space

* add to chat interface

* add flag for deferring caching

* fixes

* lazy sync

* format

* added support in chat_interface

* add documentation

* fix test

* add test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-29 23:14:33 +00:00
Srilekha P
ceabe503dc
Adding hover to shadow-alternate on the cards on the website (#7891)
* Adding Hover to shadow-alternate

* style

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-03-29 16:14:20 -07:00
Freddy Boulton
f42d3e29c7
Make internal event handlers of gr.Interface and gr.ChatInterface async (#7893)
* Make async

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-29 14:35:21 -07:00
Nicolas Oliver
c7933ffedb
Suppress printing "Running on local URL:" when quiet is set (#7892)
* Update blocks.py

Suppress printing "Running on local URL:" when quiet is set

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-29 20:23:14 +00:00
Dawood Khan
6a6db36466
Paste Images into MultimodalTextbox (#7872)
* submit button icon

* loader

* add changeset

* pr fix

* paste

* format

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-03-29 18:09:09 +00:00
Michael
ccdab9b7e7
logout route deleting cookie fix (#7886)
* logout button now deletes cookies by calling RedirectResponse before deleting cookies

* add changeset

* response

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-03-29 18:07:29 +00:00
Freddy Boulton
946487cf8e
Cache view_api info in server and python client (#7888)
* Cache view_api info

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-29 13:17:42 -04:00
aliabid94
7bbc3b62bf
JS functions break entire app if there's no input, fixed (#7865)
* changes

* add changeset

* add changeset

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-28 14:54:46 -07:00
Abubakar Abid
e6d051dc8a
Fix how files are processed in gr.ChatInterface (#7875)
* submit button icon

* loader

* add changeset

* pr fix

* paste

* format

* add changeset

* remove path

* revert

* reset cset

* add changeset

* add changeset

* guide

* guide

* fix

---------

Co-authored-by: Dawood <dawoodkhan82@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-28 10:12:02 -07:00
Abubakar Abid
b9dbcf7aa2
Make buttons in gr.ChatInterface more mobile-friendly (#7869)
* make buttons in chat interface more mobile friendly

* add changeset

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 23:41:03 -07:00
pngwn
d95a1a44d6
chore: update versions (#7826)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@gradio/fileexplorer@0.3.29 @gradio/annotatedimage@0.5.9 @gradio/app@1.30.0 @gradio/atoms@0.6.1 @gradio/audio@0.9.9 @gradio/box@0.1.12 @gradio/button@0.2.28 @gradio/chatbot@0.8.0 @gradio/checkbox@0.2.13 @gradio/checkboxgroup@0.4.7 @gradio/code@0.5.9 @gradio/colorpicker@0.2.13 @gradio/dataframe@0.6.10 @gradio/dataset@0.1.28 @gradio/downloadbutton@0.1.5 @gradio/dropdown@0.6.5 @gradio/fallback@0.2.13 @gradio/file@0.5.9 @gradio/accordion@0.3.7 @gradio/form@0.1.12 @gradio/gallery@0.8.5 @gradio/highlightedtext@0.4.13 @gradio/html@0.1.13 @gradio/icons@0.3.4 @gradio/image@0.9.9 @gradio/imageeditor@0.4.9 @gradio/json@0.1.13 @gradio/label@0.2.13 @gradio/lite@4.24.0 @gradio/markdown@0.6.8 @gradio/model3d@0.8.8 @gradio/multimodaltextbox@0.2.2 @gradio/number@0.3.13 @gradio/paramviewer@0.4.6 @gradio/plot@0.3.5 @gradio/radio@0.4.8 @gradio/simpledropdown@0.1.13 @gradio/simpleimage@0.3.9 @gradio/simpletextbox@0.1.13 @gradio/slider@0.3.1 @gradio/statustracker@0.4.10 @gradio/textbox@0.4.14 @gradio/tootils@0.2.6 @gradio/upload@0.8.2 @gradio/uploadbutton@0.5.5 @gradio/video@0.6.9 gradio@4.24.0 gradio_test@0.3.10 website@0.25.1
2024-03-27 14:25:36 -07:00
Abubakar Abid
0e125d7bef
Trigger click event from gr.DownloadButton even when no file is present (#7862)
* trigger click event download button

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 20:16:01 +00:00
aliabid94
425fd1ca9d
Benchmark fix test (#7810)
* changes

* changes

* changes

* chnages

* changes

* add changeset

* changes

* changes

* add changeset

* chnages

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 13:03:47 -07:00
Dawood Khan
8d7b3caebd
Multimodal Textbox Loading + other fixes (#7848)
* submit button icon

* loader

* add changeset

* pr fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-03-27 12:31:58 -07:00
Yuichiro Tachibana (Tsuchiya)
e3b12369b7
Lazy-import pandas (#7851)
* Lazy-import pandas

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 12:13:48 -07:00
Abubakar Abid
7af3cd7ccb
Adds a placeholder argument to gr.Chatbot (#7849)
* add placeholder

* add changeset

* add test

* format

* lint

* chatbot

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 12:13:17 -07:00
Freddy Boulton
ee804b2d56
Stop running iterators when js client disconnects (#7835)
* Add code

* add changeset

* move

* add changeset

* Add code

* Format notebook

* Address comments

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 17:41:40 +00:00
Yuichiro Tachibana (Tsuchiya)
72661e3391
Revert the minify setting in vite.config.js which was mistakingly introduced in #6261 (#7852)
* Revert the minify setting in vite.config.js which was mistakingly introduced in #6261

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 19:03:25 +09:00
Yuichiro Tachibana (Tsuchiya)
ecf5c524c2
Fix gradio/components/dataframe.py not to import pandas.io (#7840)
* Fix gradio/components/dataframe.py not to import `pandas.io`

* add changeset

* add changeset

* Fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-27 10:39:57 +09:00
Abubakar Abid
75a2bf745d
Add guide on Client state and and fix default values of components (#7830)
* add guide and default values

* add changeset

* reset session

* fix

* add changeset

* fix tests'

* Update guides/08_gradio-clients-and-lite/01_getting-started-with-the-python-client.md

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

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-03-26 21:10:43 +00:00
Abubakar Abid
05db0c4a59
Refactor CORS Middleware to be much faster (#7801)
* changes

* add changeset

* log

* add changeset

* changes

* changes

* lint

* middlware

* lint

* lint

* s
implified docstring

* fix

* revert test change

* docstring

* remove print

* update

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-26 13:17:38 -07:00
Abubakar Abid
8b099a07a5
Additional documentation related to nginx and root_url (#7832)
* nginx docs

* Update guides/09_other-tutorials/running-gradio-on-your-web-server-with-nginx.md

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

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-03-26 18:49:24 +00:00