6457 Commits

Author SHA1 Message Date
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
Yuichiro Tachibana (Tsuchiya)
1a7c8d3223
Stop importing gradio.ipython_ext in Wasm mode (#7818)
* Stop importing gradio.ipython_ext in Wasm mode

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-26 16:43:30 +09:00
renovate[bot]
f18a33a1cc
Update dependency globals to v15 (#7837)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 23:28:15 -07:00
renovate[bot]
e5c3cc9620
Update dependency katex to v0.16.10 [SECURITY] (#7828)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-25 13:05:40 -07:00
aliabid94
61cb4fd711
Benchmarking scripts for load tests (#7670)
* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-17-237.us-west-2.compute.internal>
2024-03-25 12:30:57 -07:00
Shubham raj
1c257f5ebc
Bugfix: .. in filename throwing error while loading in output. (#7795)
* Exclude filename while preventing path traversal

* add changeset

* add changeset

* Check if path1 is a file and use path1
parent to compare

* explicit

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-03-25 19:27:42 +00:00
Yuichiro Tachibana (Tsuchiya)
e0a8b7fa2c
Exclude typer from the requirements list for Wasm env and fix gradio.cli not to be imported (#7823)
* Exclude `typer` from the requirements list for Wasm env and fix `gradio.cli` not to be imported

* 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-25 12:21:19 -07:00
pngwn
bf5110a26b
chore: update versions (#7771)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@gradio/simpleimage@0.3.8 @gradio/radio@0.4.7 gradio_test@0.3.9 @gradio/wasm@0.10.0 @gradio/video@0.6.8 @gradio/uploadbutton@0.5.4 @gradio/upload@0.8.1 @gradio/tootils@0.2.5 @gradio/textbox@0.4.13 @gradio/statustracker@0.4.9 @gradio/slider@0.3.0 @gradio/simpletextbox@0.1.12 @gradio/simpledropdown@0.1.12 @gradio/paramviewer@0.4.5 @gradio/checkbox@0.2.12 @gradio/dropdown@0.6.4 @gradio/fallback@0.2.12 @gradio/file@0.5.8 @gradio/fileexplorer@0.3.28 @gradio/form@0.1.11 @gradio/gallery@0.8.4 @gradio/highlightedtext@0.4.12 @gradio/html@0.1.12 @gradio/image@0.9.8 @gradio/imageeditor@0.4.8 @gradio/json@0.1.12 @gradio/label@0.2.12 @gradio/lite@4.23.0 @gradio/markdown@0.6.7 @gradio/model3d@0.8.7 @gradio/multimodaltextbox@0.2.1 @gradio/number@0.3.12 @gradio/annotatedimage@0.5.8 @gradio/plot@0.3.4 @gradio/dataset@0.1.27 @gradio/dataframe@0.6.9 @gradio/accordion@0.3.6 @gradio/colorpicker@0.2.12 @gradio/code@0.5.8 @gradio/checkboxgroup@0.4.6 @gradio/downloadbutton@0.1.4 @gradio/chatbot@0.7.8 @gradio/button@0.2.27 @gradio/box@0.1.11 @gradio/audio@0.9.8 @gradio/atoms@0.6.0 gradio@4.23.0 gradio_client@0.14.0 @gradio/app@1.29.0 website@0.25.0
2024-03-25 12:35:44 -04:00
Dmytro Drach
f7df92f3f3
Improve UX of non-interactive slider (#7814)
* Fix disabled slider appearance

* add changeset

* tweaks

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-03-25 15:10:10 +00:00
Yuichiro Tachibana (Tsuchiya)
ff6bf3ec8f
Remove the aiohttp mock from the Wasm worker as it's removed in https://github.com/gradio-app/gradio/pull/5244 (#7789)
* Remove the aiohttp mock from the Wasm worker as it's removed in https://github.com/gradio-app/gradio/pull/5244

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-23 23:29:49 +09:00
Yuichiro Tachibana (Tsuchiya)
2c8cd0a73d
Lazy-import altair (#7782)
* Lazy-import altair

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-23 16:43:42 +09:00
Ali Abdalla
c62a57e7f8
Convert Docs Demos to Lite (#7661)
* edit demos

* edit demos

* remove and replace demos

* convert docs demos to lite

* add changeset

* working

* styling

* notebook

* notebook

* formatting

* /docs embedding from spaces

* shared worker mode

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-22 17:32:23 -07:00
Abubakar Abid
b0a3ea951c
Small fix to client.view_api() in the case of default file values (#7800)
* fix view api page

* fix

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-22 17:27:03 -07:00
Freddy Boulton
cf98c7ed18
Adds trigger_mode to gr.on. Use it to set trigger_model="always_last" for live interfaces. (#7794)
* Dep + test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-22 16:00:52 -07:00
Abubakar Abid
781678b3ac
Fix root url resolution from x_forwarded_host headers (#7787)
* logging

* add changeset

* fix

* remove print

* add changeset

* docstring

* add test

* add changeset

* docs fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-22 15:08:40 -07:00
Freddy Boulton
aad209f0c0
Decrease latency: do not run pre and postprocess in threadpool (#7796)
* revert

* add changeset

* lint

* explicit call

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-22 15:38:52 -04:00
Yuichiro Tachibana (Tsuchiya)
d831040032
Remove Ruff and Uvicorn in Wasm env (#7744)
* Exclude `ruff` from the requirements list for Wasm env

* Exclude `uvicorn` from the requirements list for Wasm env and fix the related modules not to try to import it when not used

* add changeset

* Fix tests

* add changeset

* Apply formatter

* Remove a test case which became unnecessary in https://github.com/gradio-app/gradio/pull/5267, ref: https://github.com/gradio-app/gradio/pull/7744#issuecomment-2011332287

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-22 17:32:59 +09:00
Abubakar Abid
2efb05ed99
Adds support for kwargs and default arguments in the python client, and improves how parameter information is displayed in the "view API" page (#7732)
* changes

* changes

* add changeset

* improvements to api docs ui

* add changeset

* ux design work

* further styling

* feedback

* add changeset

* get parameter name

* fix code snippet

* construct args

* add changeset

* construct_args

* utils

* changes

* add catches

* fixes

* valid

* fix tests

* js lint

* add tests

* add changeset

* format

* client

* doc

* fixes

* changes

* api docs fixes

* fix .view_api()

* updating guide wip

* guide

* updated guides'

* fix

* guide fixes

* filepath

* address review

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-21 17:18:13 -07:00
Freddy Boulton
755157f99c
Do not reload code inside gr.NO_RELOAD context (#7684)
* Add code

* Copy files

* I think its working

* Tidy up

* add changeset

* do not change demos

* test

* Don't copy files

* Add code

* lint

* Add reload mode e2e test

* Reload mode test

* add changeset

* add changeset

* Use NO_RELOAD

* add no reload to docs

* add changeset

* Fix docs

* handle else statements. No need to edit string

* Fix typos

* Use compile

* Do not use unparse

* notebook

* Documentation comments

* Fix top-package import without having to delete all modules

* Revert demo calculator

* Typo guides

* Fix website

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-03-21 15:59:53 -04:00
Freddy Boulton
43ae23f092
Fix accidental bug that prevented custom textboxes from being passed to chatinterface (#7783)
* Add code

* add changeset

* Update gradio/chat_interface.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-03-21 19:22:14 +00:00
Abubakar Abid
dd3e363261
Fail CI if lint or typecheck fails (#7770)
* fail

* test

* revert

* run shebang

* fix

* fixes

* add changeset

* changes

* bash

* not required

* file

* textbox

* add changeset

* changes to demo

* notebook

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-21 11:34:56 -04:00
Hannah
ca42748590
Ensure paginate updates when samples value changes in Dataset (#7761)
* ensure paginate updates when samples value changes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-21 15:12:34 +00:00
Freddy Boulton
f73a9bbcd7
Fix theme gallery space (#7758) 2024-03-20 17:47:24 -04:00
Freddy Boulton
e78bca4f37
Trigger input event for Radio even when radio is output component (#7762)
* Add code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-20 16:58:33 -04:00