* Use orjson to serialize dict including np.array
* add changeset
* Update json_component demo and add an E2E test using it
* Rename demo/json_component -> demo/json_component_blocks
* Add json_component_interface demo and an E2E test using it
* Fix to await assertion promises
* Revert renaming of json_component demo
* add changeset
* Rename js/app/test/json_component_blocks.spec.ts -> js/app/test/json_component.spec.ts
* Revert changes in routes.py and add orjson to json_component.py
* Update gr.Checkbox.postprocess to ensure a bool value is returned
* add changeset
* Remove the if-block in gr.Checkbox.postprocess handling NumPy arrays as they are not reasonable values to be interpreted as checkbox's value
* Update gr.JSON's docstring
* Add test/components/test_json_component.py
* Remove JSON component E2E tests
* Update gr.JSON's docstring
* docstring
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Logout user if oauth token has expired
* add changeset
* add changeset
* mark flaky test as flaky
* fixes
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* Fix an enconding issue in gradio/components/code.py
Changes Made:
Modified the postprocess function in gradio/components/code.py to handle file encoding properly.
Added encoding="utf-8" parameter to the open function when reading code files. I hardcoded UTF-8 because I couldn't figure out how to specify the encoding, similar to the fix in gradio-app#8075. My issue is gradio-app#8076
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Fix bug causing Hot Reload failure in code containing non-English languages due to missing encoding specification (#8070)
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Update `async_save_url_to_cache` to work on Wasm
* Refactoring `save_url_to_cache`
* add changeset
* Fix
* Use pyodide.http as a custom transport of httpx
* Use urllib3 as a custom transport of httpx to make sync http requests
* Add an E2E test case to detect the bugs on remote resource caching
* add changeset
* Add image_remote_url E2E test
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* Add an explicit dependency of `urllib3` and update `processing_utils.save_url_to_cache` to use `urllib3` for Lite support
* add changeset
* Update requirements.txt
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* add changeset
* update test requirements
* update test reqs
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* fix(chat_interface.py): fix 'submit_btn' not being set to 'None' when an instance of 'gr.MultimodalTextbox' is passed to 'textbox' argument of 'ChatInterface'
* fix typo
* add changeset
* fix(chat_interface.py): fix 'container' glitch for multimodal interface
* fix(chat_interface.py): fix bug where empty string is added to history when only a file or more was provided
* fix prior commit
* add changeset
* fix lines interchanged
---------
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
* Document that show_copy_button in gr.Textbox is not visible when show_label=False
Remove dict_to_dataclass since its not used
* add changeset
* tweak wording
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
* GRADIO_SHARE Environment Variable
An environment variable to force `share=True` when launching gradio, regardless of what was passed in as argument.
Useful for taking any Gradio-powered app and making them run with the gradio.live link WITHOUT having to update the code.
* make it work for both share=True and share=False
* correct parsing
- `"GRADIO_SHARE": "0"` => `False`
- `"GRADIO_SHARE": "1"` => `True`
* comment
* Apply GRADIO_SHARE only if it's not specified in code.
* one line
* remove line
* add changeset
* included in docstring
* add changeset
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* 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>
* 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>
* 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>