Commit Graph

6058 Commits

Author SHA1 Message Date
Yuichiro Tachibana (Tsuchiya)
b450cef156
Fix type the docstring of the Code component (#5905)
* Fix type the docstring of the Code component

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-15 18:11:14 -07:00
Yuichiro Tachibana (Tsuchiya)
891d42e9ba
Define Font.__repr__() to be printed in the doc in a readable format (#5904)
* Define Font.__repr__() to be printed in the doc in a readable format

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-15 18:10:28 -07:00
Abubakar Abid
c4ba832b31
Remove deprecation warning from gr.update and clean up associated code (#5890)
* update

* add changeset

* remove

* add changeset

* test

* update

* changes

* revert

* fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-15 17:58:06 -07:00
Hannah
f0e76a082e
Delete sweep.yaml (#5911) 2023-10-14 18:02:43 +02:00
Yuichiro Tachibana (Tsuchiya)
121f25b2d5
Lite: Fix is_self_host() to detect 127.0.0.1 as localhost as well (#5886)
* Fix is_self_host() to detect `127.0.0.1` as localhost as well

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-13 13:57:21 +09:00
Abubakar Abid
a55b809423
Add styling (e.g. font colors and background colors) support to gr.DataFrame through the pd.Styler object (#5877)
* colors

* add changeset

* revert

* revert

* colors

* move box shadow

* done

* lint

* lint

* fixes

* lint

* added focused false

* revert focus

* revert focus

* revert focus

* revert focus

* revert focus

* apply style to td instead

* dataframe

* lint

* test

* Update js/dataframe/shared/Table.svelte

Co-authored-by: aliabid94 <aabid94@gmail.com>

* notebooks

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-10-12 15:45:55 -07:00
Aileen Villanueva Lecuona
e70805d54c
Change BlockLabel element to use <label> (#5864)
* refactor: change to label tag where label property is accepted by component

BlockLabel is being used as the main component for labels and should address the issue reported in Chat and File component

closes issue 5454

* add changeset

* fix: A form label must be associated with a control.

* Update js/atoms/src/BlockLabel.svelte

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

* add changeset

* add changeset

* fix: refactor use label tag instead of div tag
Change CSS styles from div to label selector in BlockLabel

* fix: A form label must be associated with a control

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2023-10-12 13:13:03 +02:00
Yuichiro Tachibana (Tsuchiya)
ead265c1b9
Lite: Convert an error object caught in the worker to be cloneable (#5838)
* Convert an error object caught in the worker to be cloneable so it can be delegated to the main thread properly

* add changeset

* Add a comment

* Fix the error serialization for the inter-thread messaging

* Fix reply error message

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-10-12 15:49:52 +09:00
Abubakar Abid
fbce277e50
Keep Markdown rendered lists within dataframe cells (#5878)
* df bullets

* keep bullets inside dataframe columns

* don't apply to chatbot

* added ols

* add changeset

* fix white space a

* add changeset

* revert change

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-11 20:52:56 -07:00
Abubakar Abid
c07207e0bc
Remove deprecated .update() usage from Interface internals (#5862)
* remove deprecated .update() usage from Interface

* add changeset

* add changeset

* builder app

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-11 11:51:16 -07:00
pngwn
4e0d87e9c4
fix @gradio/lite dependencies (#5868)
* publish @gradio/wasm

* add changeset

* fix deps

* add changeset

* revert publish

* fix lockfile

* add changeset

* fix lockfile

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-11 09:56:02 +01:00
D V
5f1cbc4363
Add support for gr.Request to gr.ChatInterface (#5819)
* Add support for gr.Request to gr.ChatInterface

* add changeset

* gr.ChatInterface: loose check for gr.Request

* add request test

* update test and chat_interface

* chat interface

* fix test

* formatting

* fixes

* fix examples and add test

* remove .update usage

* revert interface changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-10 13:48:20 -07:00
Aileen Villanueva Lecuona
46334780db
Mention that audio is normalized when converting to wav in docs (#5835)
* Mention that audio is normalized when converting to wav in docs

* add changeset

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-09 14:36:33 -04:00
Kit PANG
b83064da00
Fix error when scrolling dropdown with scrollbar (#5839)
* Fix error when scrolling dropdown with scrollbar

* added comment

* add changeset

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-08 18:34:05 -07:00
Hari Om Bhardwaj
1d5b15a2d2
Assert refactor in external.py (#5811)
* Refactored assert statements to if statements

* format-addons

* format

* add changeset

* Update gradio/external.py

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

* refactored video.py

* refactored all the assert statements with response

* add changeset

* add changeset

* Apply suggestions from code review

* Refactored documentation.py and few more files

* avoid circular

* Replaced all assert statements

* lint

* notebooks

* fix

* minor changes

* final changes according to tests

* Lint

* last fix

* fix

* fix utils test

* fix serialization error

* fix serialization error

---------

Co-authored-by: harry-urek <hariombhardwaj038@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-06 18:14:14 -07:00
Dawood Khan
48e09ee887
Quick fix: Chatbot change event (#5827)
* fix

* add changeset

* add dequal to dependency

* package

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-06 11:16:59 -07:00
Yuichiro Tachibana (Tsuchiya)
7b63db2716
Convert async methods in the Examples class into normal sync methods (#5822)
* Convert async methods in the Examples class into normal sync methods

* add changeset

* Fix test/test_chat_interface.py

* Fix test/test_helpers.py

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-06 11:05:11 -07:00
Yuichiro Tachibana (Tsuchiya)
1aa186220d
Lite: Fix Examples.create() to be a normal func so it can be called in the Wasm env (#5821)
* Fix Examples.create() to be a normal func so it can be called in the Wasm env

* add changeset

* Add a comment line

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-06 10:57:22 -07:00
pngwn
1265a9ac13
chore: update versions (#5817)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 19:55:12 -07:00
Abubakar Abid
796145e2c4
Fix calls to the component server so that gr.FileExplorer works on Spaces (#5816)
* changes

* add changeset

* changes

* demo

* file explorer

* lint

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 19:38:59 -07:00
pngwn
3d263ba007
chore: update versions (#5796)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-05 14:10:45 -07:00
Regina Reynolds
60a698b9cb
docs: fix website directory in CONTRIBUTING.md (#5810) 2023-10-05 12:58:56 -07:00
Abubakar Abid
a0d3cc45c6
Fix gr.SelectData so that the target attribute is correctly attached, and the filedata is included in the data attribute with gr.Gallery (#5798)
* fix select

* add changeset

* add changeset

* restore

* refactor

* add pytest

* typo

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 12:53:52 -07:00
Srijan Sahay Srivastava
37e70842d5
added try except block in state.py (#5790)
* added try except block in `state.py`

added try except block in `state.py` which will raise a "ValueError"

* add changeset

* updated `state.py` and added test for deepcopy

updated `state.py` and added test for deepcopy named test_initial_value_deepcopy in `test/test_components.py`

* lint

* test fix

* explain test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 12:33:15 -07:00
Abubakar Abid
4567788bd1
Adds the ability to set the selected_index in a gr.Gallery (#5783)
* selected_index

* Gallery

* changes

* modify

* add changeset

* fix select issue

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 11:35:42 -07:00
Abubakar Abid
957ba5cfde
Prevent bokeh from injecting bokeh js multiple times (#5795)
* remove dep line in demo

* linting

* linting

* fix

* merge

* add changeset

* lint

* notebook:

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 11:17:49 -07:00
Freddy Boulton
c0fef44541
Revert replica proxy logic and instead implement using the root variable (#5776)
* Revert "Fix for deepcopy errors when running the replica-related logic on Spaces (#5722)"

This reverts commit dba651904c.

* Revert "Fully resolve generated filepaths when running on Hugging Face Spaces with multiple replicas (#5668)"

This reverts commit d626c21e91.

* add changeset

* Trigger local

* add changeset

* add to root

* add changeset

* strip url

* resolve root

* changes

* fix

* format

* logs

* format

* add changeset

* reverse order

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-05 11:17:16 -07:00
Hannah
59c3591419
Update CONTRIBUTING.md (#5799)
* updates

* tweak

* tweaks

* tweaks

* add troubleshooting

* storybook tweak

* add review changes

* fe tweak
2023-10-05 16:09:47 +01:00
aliabid94
e4a307ed6c
Add component <-> server direct communication support, as well as a "file explorer" component (#5672)
* changes

* changes

* add changeset

* add changeset

* Server fns ext (#5760)

* start changes

* changes

* changes

* fix arrows

* add changeset

* rename demo

* fix some ci

* add changeset

* add changeset

* fix

* remove configs

* fix

* fix

* add changeset

* fixes

* linting

* Update gradio/components/file_explorer.py

* notebook

* typing

* tweaks

* fixed class method problem

* fix test

* file explorer

* gr.load

* format

* tweaks

* fix

* fix

* fix

* fix

* final tweaks + changelog

* changelog

* changelog

* changelog

* lint

---------

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>
2023-10-05 14:20:01 +01:00
gibiee
caeee8bf78
ensure the client does not depend on window when running in a node environment (#5787)
* modify url_params

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-05 14:14:10 +01:00
Hannah
f096c3ae16
Throw helpful error when media devices are not found (#5794)
* add test

* add changeset

* tweak copy

* error logic

* add changeset

* copy tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 20:31:00 +01:00
Abubakar Abid
ed0f9a21b0
Adds change() event to gr.Gallery (#5780)
* add change event to gallery

* revert

* format

* add changeset

* lint

* add tests

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 12:25:03 -07:00
pngwn
5d5ddcfa9b
chore: update versions (#5786)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-04 15:46:45 +01:00
Hannah
1ea6080247
change minor to patch (#5793) 2023-10-04 15:37:57 +01:00
Hannah
e2874bc3cb
fix pending chatbot message styling and ensure messages with value None don't render (#5775)
* fix pending chatbot message styling

* border fixes

* add changeset

* add changeset

* ensure null messages arent shown

* add hide css again

* render loading inside message + add test

* fix test

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 14:50:19 +01:00
Yuichiro Tachibana (Tsuchiya)
6e56a0d9b0
Lite: Websocket queueing (#5124)
* Create a Wasm-emulated WebSocket connection and fix @gradio/client to inject it

* Explicitly set the default response class for the Wasm mode

* add changeset

* Fix is_self_origin() to compare only hosts and rename it to is_self_host()

* Fix Blocks.close() to cancel async tasks in the case of Wasm and call it from wasm_utils.register_app() to dispose an old app instance

* Update comment

* Hold the asyncio.Task objects and cancel them at `Blocks.close()`

* Add try-except to handle the case where `events` is not set to `queue.active_jobs` when `queue.process_events` is called

* Format queueing.py

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-04 18:19:09 +09:00
Freddy Boulton
f09aea34d6
Always deploy to spaces (#5777) 2023-10-03 14:52:14 -04:00
Hannah
2626a26f18
add label to changeset pr (#5772) 2023-10-03 14:18:21 +02:00
pngwn
d6295df030
chore: update versions (#5742)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-02 20:55:55 -07:00
Dawood Khan
e842a561af
Fix new line issue in chatbot (#5755)
* fix new line

* add changeset

* line breaks param

* add changeset

* fix test

* Update gradio/components/chatbot.py

* Update gradio/components/dataframe.py

* Update gradio/components/markdown.py

* add changeset

* fix static markdown

* lint

* line breaks

* fixes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-02 20:44:58 -07:00
Abubakar Abid
502054848f
Fix Gallery columns and rows params (#5754)
* fix gallery params

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 20:11:09 -07:00
Abubakar Abid
ef96d35122
Don't raise warnings when returning an updated component in a dictionary (#5766)
* testing

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 19:48:32 -07:00
Abubakar Abid
2a5b9e03b1
Added support for pandas Styler object to gr.DataFrame (initially just sets the display_value) (#5569)
* adding precision to df

* add changeset

* docstring

* precision

* add changeset

* fix

* fixes

* add changeset

* add visual test

* lint

* fixes

* lint

* format

* add changeset

* ts changes

* analytics

* dataframe typing

* typing

* demo

* fix

* lint

* interactive dataframe

* dataframe

* fix typing

* add test

* upgrade pandas version

* fix pandas version

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 14:02:03 -07:00
Abubakar Abid
caf6d9c0e1
Set share=True for all Gradio apps in Colab by default (#5767)
* Set share=True for all Gradio apps in Colab by default

* add changeset

* fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 12:51:56 -07:00
Hannah
8f0fed857d
Improve chatbot accessibility and UX (#5699)
* add a11y changes and css tweaks

* add a11y changes and css tweaks

* change like/dislike/copy buttons ux

* cleanup

* add laout param

* tweak

* add changeset

* fill icon on click

* text alignment tweak

* format + test

* fix browser test

* avatar tweaks

* add stories

* tweak

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-02 19:29:20 +02:00
Hannah
546e1d89f4
Add design tokens to storybook (#5750)
* add design tokens to storybook

* tweak

* tweak

* visual tweaks

* add icons
2023-10-02 13:52:09 +02:00
Hannah
abb5e9df47
Ensure images with no caption download in gallery (#5735)
* ensure images with no caption download in gallery

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-29 16:34:28 +02:00
Florian Bruggisser
c9af4f7940
Added timeout and error handling for frpc tunnel (#5731)
* added timeout and error handling for frpc tunnel

* add changeset

* lint

* typing

* spell

* tunneling

* lint

* strip

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-09-28 13:47:14 -07:00
pngwn
898668596d
chore: update versions (#5712)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-28 12:06:09 -07:00
Yuichiro Tachibana (Tsuchiya)
3a48490bc5
Add a bare Component type to the acceptable type list of gr.load()'s inputs and outputs (#5732)
* Add a bare `Component` type to the acceptable type list of `gr.load()`'s `inputs` and `outputs`

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-09-28 11:39:56 -07:00