Commit Graph

6098 Commits

Author SHA1 Message Date
Yuichiro Tachibana (Tsuchiya)
5d00dd37ca
Make <UploadProgress /> Wasm-compatible (#6965)
* Make <UploadProgress /> Wasm-compatible

* add changeset

* Fix <DownloadLink /> not to prefetch the data in the Wasm mode

* add changeset

* Fix <DownloadLink /> to check the `window` object existence for SSR

* Lite: Fix and improve the file upload progress SSE (#6978)

* Update the Wasm ASGI connection to be able handle ReadableStream, which is used for example in <Upload />"

* Fix wasm_proxied_fetch() not to pass a leading '?' in the query_string to WorkerProxy.httpRequest() because it's required by the ASGI spec

* Fix FileUploadProgress.update() to merge a new item to the existing one in the queue

* Fix the SSE stream async task in the /upload_progress endpoint removing an unreached code block. `await asyncio.sleep()` has been moved from the unreached block to a live location, so the stream cadence has been reduced

* Fix `FileUploadProgress` to manage the `is_done` flag independent from the queue because it has a different semantics and checking it is a priority over reading other progress events to abort the SSE stream when uploading is done

* Refactoring

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-01-10 21:27:58 +04:00
Hannah
0f0498bf97
Ensure Chatbot theme text size is set correctly (#6958)
* set font size to text body variable

* revert comment

* add changeset

* remove line height

* add function to adjust body text size to prevent breaking change

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-10 13:41:35 +01:00
Tom Jorquera
c264828f92
docs: fix dead links in guides (#6985)
Fix dead links to doc in guides.

The dead link to
https://gradio.app/guides/quickstart/#blocks-more-flexibility-and-control
has been replaced by https://gradio.app/blocks-and-event-listeners.

Note: the CHANGELOG also has some references to the old links. I did not
change those in this commit.

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-01-10 04:19:48 +04:00
aliabid94
6e285be8ed
Fix the reloader (#6983)
* changes

* add changeset

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid@Alis-MacBook-Pro.local>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-09 15:18:07 -08:00
Yuichiro Tachibana (Tsuchiya)
5e0016267f
Make <Gallery /> Wasm-compatible (#6967)
* Use @gradio/image/shared/Image.svelte in the Gallery component for Wasm support

* Make the download button on the Gallery component Wasm-compatible

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-09 11:34:46 +09:00
Hannah
793bf8f7b1
Display pending file in <Upload /> while waiting for upload request (#6969)
* show file to be uploaded before request begins

* add changeset

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-08 17:36:41 +01:00
Dr. Christoph Mittendorf
8dfabee004
fixed typo (#6963)
* fixed typo

stored vs storied

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-07 18:57:07 -08:00
Dawood Khan
640b7fe052
Fix issue with Webcam Recording (#6885) 2024-01-05 19:18:59 -05:00
pngwn
3a0a11cf42
chore: update versions (#6882)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-04 16:02:25 -08:00
Dr. Christoph Mittendorf
7bab755f7c
Fixed (this this) (#6956)
* Fixed (this this)

Spelling

* add changeset

* more fixes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-04 15:41:11 -08:00
aliabid94
6c863af92f
Fix functional tests (#6931)
* changes

* add changeset

* add changeset

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid@Alis-MacBook-Pro.local>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-04 15:39:16 -08:00
Hannah
d361a0f179
Ensure camera settings only update when necessary in Model3D (#6871)
* change reset_camera_position reactivity logic

* check for changes when resetting scene

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-04 10:39:57 -08:00
thiswillbeyourgithub
377725cbb7
docs: example for keyboard shortcut using custom js (#6952)
* docs: example for keyboard shortcut using custom js

Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>

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

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

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

---------

Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-04 10:31:16 -08:00
Abubakar Abid
b1b78c2168
Fix .select for gr.Image, gr.CheckboxGroup (#6942)
* fix .select for Image, CheckboxGroup

* add changeset

* generate notebook

* fix

* add changeset

* fixes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-04 07:57:18 -08:00
Abubakar Abid
e671e5415f
Allow gr.ClearButton and gr.DuplicateButton to be made hidden (and otherwise updated) (#6932)
* clear visible

* test

* other buttons

* add changeset

* move resource to block cache

* revert

* Revert "revert"

This reverts commit 9830f253ac.

* notebook

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-03 11:29:16 -08:00
Abubakar Abid
c00da89c3e
Fix returning copies of a component instance from a prediction function (#6940)
* add test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-03 11:26:58 -08:00
renovate[bot]
de603edfe2
Update FedericoCarboni/setup-ffmpeg action to v3 (#6941)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 08:15:17 -08:00
D
459c5dc989
replacing distutils.StrictVersion dependency for Python 3.12 (#6938)
* replacing distutils.StrictVersion dependency with packaging.version.Version after distutils deprecation (in 3.10) and removal in Python 3.12 (see https://docs.python.org/3.10/whatsnew/3.10.html#distutils-deprecated)

* add changeset

* remove distutils

* add changeset

---------

Co-authored-by: daniel <daniel@tfc.ai>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-03 08:05:40 -08:00
Ronen Schaffer
02c2442217
Fix docstring of deprecated parameter concurrency_count (#6916)
* Fix docstring of deprecated parameter concurrency_count

The old docstring mentioned that it has no effect. Contrary to that, it will raise an exception.

* add changeset

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-01-02 13:34:32 -08:00
koji
ad76f702c2
fix item number in custom css and js doc (#6915)
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-01-02 13:33:42 -08:00
Yuichiro Tachibana (Tsuchiya)
f742d0e861
Lite: Support AnnotatedImage on Wasm (#6133)
* Make AnnotatedImage Wasm-compatible

* add changeset

* Fix AnnotatedImage.svelte to render `<img>`s immediately and update their `src` values after those are resolved asynchronously

* Fix comments

* add changeset

* Rename a variable for consistency with `Image.svelte`

* Fix a variable name

* Rename  to

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-01-02 11:43:34 +04:00
Yuichiro Tachibana (Tsuchiya)
bd11d6e570
Remove the styles on the audio elements in the Chatbot component (#6899)
* Remove the styles on the audio elements in the Chatbot component

* 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-01-02 11:41:59 +04:00
Yuichiro Tachibana (Tsuchiya)
4511d57c46
Fix the aria-label attrs in gr.Chatbot() (#6900)
* Fix the aria-label attrs in `gr.Chatbot()`

* 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-01-02 11:41:28 +04:00
Yuichiro Tachibana (Tsuchiya)
fb9c6cacd7
Lite: Chatbot (#6897)
* Make Chatbot Wasm-compatible

* Make UploadButton Wasm-compatible

* 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-01-02 11:41:10 +04:00
Yuichiro Tachibana (Tsuchiya)
649cd4d680
Use EventSource_factory in open_stream() for Wasm (#6820)
* Use `EventSource_factory` in `open_stream()` for Wasm

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-12-30 23:28:54 +04:00
Ali Abdalla
a5f3d2bef2
Fix broken redirects and guides in website (#6913)
* fix broken redirects

* fix broken redirects

* add changeset

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-30 22:31:17 +04:00
Yuichiro Tachibana (Tsuchiya)
0cf93e50b8
Make shell scripts executable and fix their shebangs (#6901)
* Add executable permission to scripts/*.sh

* Set -eu to the shebang in /scripts/*.sh

* Fix client/python/scripts/*.sh
2023-12-29 08:21:51 -08:00
Dr. Christoph Mittendorf
be76467933
fixed typo (#6896)
fixed typo
2023-12-29 08:17:57 -08:00
aliabid94
24a5836880
Component Server fix (#6884)
* changes

* add changeset

* Update gradio/routes.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* changes

* changes

---------

Co-authored-by: Ali Abid <ubuntu@ip-172-31-25-241.us-west-2.compute.internal>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Aarni Koskela <akx@iki.fi>
2023-12-27 14:16:56 -08:00
Abubakar Abid
53b95f8683
Adding instructions on how to build Gradio-Lite locally (#6870)
* changes

* Fix scripts/launch_lite.sh removing the unnecessary execution of `python -m http.server`

* Add an exec permission to scripts/launch_lite.sh (`chmod +x`)

* Update launch_lite.sh to run the pybuild command when necessary

* Update CONTRIBUTING.md

* Fix scripts/build_lite.sh

* rename

* Update CONTRIBUTING.md

* Update scripts/run_lite.sh

---------

Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
2023-12-27 00:38:52 -08:00
Yuichiro Tachibana (Tsuchiya)
8a093e23d7
Add a dev instruction for lite in SharedWorker mode (#6778)
* Add a dev instruction for lite in SharedWorker mode which is confusing like https://github.com/gradio-app/gradio/pull/6398#issuecomment-1849880619

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-27 00:29:43 -08:00
Yuichiro Tachibana (Tsuchiya)
8333db83ac
Fix the Wasm worker to initialize the app directories (#6887)
* Fix the Wasm worker to initialize the app directories

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-27 00:27:36 -08:00
Josh Wilson
31c23166f0
fix issue 6873: File with file_count='directory' bug (#6874)
* fix issue 6873: File with file_count='directory' bug

* add changeset

* fixes

---------

Co-authored-by: Joshua Wilson <uqjwil54@uq.edu.au>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-26 11:57:49 -08:00
Ikko Eltociear Ashimine
f416da8509
Fix typo in 02_controlling-layout.md (#6875)
specifc -> specific
2023-12-26 11:36:03 -08:00
pngwn
227221f887
chore: update versions (#6855)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-22 13:05:17 -08:00
Freddy Boulton
d406855795
Fix JS Client when app is running behind a proxy (#6863)
* Fix subdomain

* add changeset

* lint

* Ts check

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-22 15:00:42 -05:00
Freddy Boulton
e32557d0ab
Add some playwright tips to the test strategy document (#6864)
* Add strategy

* Fix some typos

* typo

* Add testing-guideline

* Typo
2023-12-22 15:00:28 -05:00
Abubakar Abid
48d6534b40
Add show_api parameter to events, and fix gr.load(). Also makes some minor improvements to the "view API" page when running on Spaces (#6846)
* show api

* chnages

* add changeset

* changes

* changes to interface

* set show_api=False

* changes

* development

* examples

* changes

* add changeset

* changes

* changes

* format

* add changeset

* add changeset

* changes

* revert

* fixes

* is vaild

* push

* fixes'

* fixing

* fixes

* format

* fixed

* demo

* test

* format

* add changeset

* fix tests

* fix

* format

* cleanup

* remove

* fixes

* add test

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-22 11:59:02 -08:00
Hannah
15c97c6d34
Fix webcam when streaming=True (#6865)
* show webcam when streaming value is true

* add story

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-21 19:50:11 +01:00
Dawood Khan
e974cf045c
Custom JS Guide (#6839)
* guide

* fix

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

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

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

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

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

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

* guide fix

* add changeset

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-20 21:16:21 -05:00
Abubakar Abid
7bb561a294
Rewriting parts of the README and getting started guides for 4.0 (#6767)
* doc rewrite

* changes

* changes

* tip

* changes

* notebook

* add changeset

* history

* add

* quickstart done

* readme

* changes

* quickstart

* changes

* reorder

* link

* changes

* changes

* changes

* quickstart done

* readme

* quickstart

* quickstart'

* moving around

* spaces

* readme

* guides

* guides

* links

* readme

* readme

* readme

* readme

* readme

* readme

* readme

* readme

* readme

* readme

* email address

* add changeset

* shorten quickstart

* readme

* Update README.md

* readme

* changes

* Update guides/01_getting-started/01_quickstart.md

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

* Update guides/01_getting-started/01_quickstart.md

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

* Update guides/01_getting-started/01_quickstart.md

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

* changes

* changes

* remove gr.Interface.load

* guides

* changes

* more changes

* changes

* sharing

* concurrency

* changes

* changes

* components

* key features

* event listeners

* features

* notebook

* test

* guides

* changes

* changes

* changes

* transitions

* readme links

* links

* links

* guides

* new gif

* add gif

* update gif

* Update guides/02_building-interfaces/01_more-on-examples.md

* Update guides/03_building-with-blocks/01_blocks-and-event-listeners.md

* Update guides/01_getting-started/01_quickstart.md

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

* Update guides/01_getting-started/02_key-features.md

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

* Update guides/01_getting-started/02_key-features.md

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

* Update guides/02_building-interfaces/00_the-interface-class.md

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

* Update guides/01_getting-started/01_quickstart.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/01_getting-started/02_key-features.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* Update guides/01_getting-started/02_key-features.md

Co-authored-by: Hannah <hannahblair@users.noreply.github.com>

* changes

* replace space

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2023-12-20 11:07:48 -08:00
renovate[bot]
e528f98b88
chore(deps): update dependency mrmime to v2 (#6854)
* chore(deps): update dependency mrmime to v2

* add changeset

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-20 10:15:15 -08:00
pngwn
160e389580
chore: update versions (#6825)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-19 16:17:10 -08:00
Abubakar Abid
de24424d30
skip the right functional test (#6845)
* skip functional test 2

* format
2023-12-19 16:07:52 -08:00
Abubakar Abid
17a1eb63e0
skip flaky functional test (#6844) 2023-12-19 15:29:45 -08:00
pngwn
846d52d1c9
Fix md highlight (#6842)
* ensure gr.Markdown instances have their own instance of the markdown renderer

* fix demo

* add changeset

* skopip test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-19 20:42:41 +00:00
aliabid94
828fb9e6ce
Refactor queue so that there are separate queues for each concurrency id (#6814)
* change

* changes

* add changeset

* add changeset

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <ubuntu@ip-172-31-25-241.us-west-2.compute.internal>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-19 11:42:56 -08:00
Hannah
73268ee2e3
Improve source selection UX (#6766)
* Add new source option styling for pasting from clipboard
Use SourceSelect in Image component

* prevent device selection cut off
tweak source selection ux

* Check for dupe sources in source selection
Set sources[0] to active_source in Image

* tweaks

* tweak

* add image interaction test

* more tests

* improve light/dark mode color contrast

* add changeset

* remove unused prop

* add no device found placeholder
change T<sources> -> T<source_types>

* style tweak

* allow pasting on click + add e2e test

* fix e2e tests

* formatting

* add timeout to e2e test

* tweak

* tweak test

* change `getByLabel` to `getByText`

* value tweak

* logic tweak

* test

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-19 19:24:08 +00:00
Lerk
16c0e4015c
Update running-gradio-on-your-web-server-with-nginx.md (#6804)
Add proxy_buffering parameter.
2023-12-19 08:44:25 -08:00
cswamy
77c900311e
Fixes issue 5781: Enables specifying a caching directory for Examples (#6803)
* issue 5781 first commit

* second commit

* unnecessary str removed

* backend formatted

* Update gradio/helpers.py

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

* Update guides/02_building-interfaces/03_more-on-examples.md

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

* tests added

* add changeset

* format

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-18 17:07:38 -08:00