Commit Graph

5786 Commits

Author SHA1 Message Date
Abubakar Abid
b8b9f6d27e
Adds a Guide on how to stylize the DataFrame component (#5936)
* add guide

* fix prev and next guide hrefs

* make prev and next reactive

* add changeset

---------

Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-18 14:55:31 -07:00
Freddy Boulton
6a64b2d281
Add test (#5985) 2023-10-18 13:18:42 -07:00
pngwn
7415ffb0d8
chore: update versions (#5981)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-18 20:06:23 +01:00
pngwn
bea931c31b
release lite (#5988) 2023-10-18 19:55:05 +01:00
Yuichiro Tachibana (Tsuchiya)
ab1e5da557
Lite: Fix error handling on the ASGI app (#5982) 2023-10-18 18:38:18 +01:00
Yuichiro Tachibana (Tsuchiya)
a32aabaf50
Lite: Show initialization progress messages (#5983) 2023-10-18 18:37:14 +01:00
Yuichiro Tachibana (Tsuchiya)
d8a6491a18
Specify FastAPI version for the Wasm runtime as a workaround (#5987) 2023-10-18 18:30:33 +01:00
Yuichiro Tachibana (Tsuchiya)
686719a3b0
Lite: Explicitly install a specific version of anyio to avoid version conflicts (#5980)
* Lite: Explicitly install a specific version of `anyio` to avoid version conflicts

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-18 18:16:58 +09:00
pngwn
27d73cf2cd
chore: update versions (#5976)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-18 00:27:20 -07:00
Abubakar Abid
ddd9749561
Just a small tweak to trigger a release of @gradio/lite (#5975)
* tweak

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-18 00:11:50 -07:00
pngwn
35f58db405
chore: update versions (#5940)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-17 23:38:35 -07:00
Yuichiro Tachibana (Tsuchiya)
11a3007916
Lite: Support opening the entrypoint HTML page directly in browser via the file: protocol (#5972)
* Use a special fake hostname for the API access when the page is opened via the `file:` protocol

* Move js/app/src/lite/url.ts -> js/wasm/svelte/host.ts

* Add a comment

* Move js/wasm/svelte/host.ts -> js/wasm/network/host.ts

* add changeset

* Add a comment

* add changeset

* Update js/wasm/package.json adding a ESM subpath

* Fix `is_self_host()`

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-17 23:25:01 -07:00
Yuichiro Tachibana (Tsuchiya)
921334526f
Lite: Support the custom HTML element syntax <gradio-lite> (#5953)
* Create a custom element `<gradio-app`> for Gradio-lite

* Parse `<gradio-app`> attributes to configure the top level component

* Move custom-element code to lite/custom-element module

* add changeset

* Apply formatter

* Rename the custom element `<gradio-app>` to `<gradio-lite>`

* Fix the .gradio-lite to be minimum

* 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-18 15:07:13 +09:00
Yuichiro Tachibana (Tsuchiya)
6780d660bb
Make the HTTP requests for the Wasm worker wait for the initial run_code() or run_file() to finish (#5958)
* Make the HTTP requests for the Wasm worker wait for the initial `run_code()` or `run_file()` to finish

* add changeset

* Support top-level await with `run_file()`

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-17 11:49:40 -07:00
Yuichiro Tachibana (Tsuchiya)
f769876e0f
Apply formatter (and small refactoring) to the Lite-related frontend code (#5956)
* Apply formatter (and small refactoring) to the Lite-related frontend code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-18 01:15:00 +09:00
Hannah
465f58957f
Show empty JSON icon when value is null (#5944)
* show empty json icon when value is null

* add changeset

* move empty check logic to parent component

* add changeset

* revert changes

* add changeset

* tweak

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-17 15:11:28 +02:00
Abubakar Abid
fee3d527e8
Adds column_widths to gr.Dataframe and hide overflowing text when wrap=False (#5894)
* changes

* added prop

* add changeset

* table

* null case

* fix tests

* add story

* format

* lint

* add changeset

* Update js/dataframe/shared/Table.svelte

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

* add support for ints

* added test

* docstring

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-10-16 16:14:11 -07:00
renovate[bot]
f78e35d5ac
Update dependency svelte-i18n to v4 (#5924)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-16 14:35:14 -07:00
pngwn
a46cb94870
chore: update versions (#5831)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-16 13:30:41 -07:00
Ali Abdalla
8d909624f6
Fix styling issues with Audio, Image and Video components (#5934)
* audio styling fix

* video styling fix

* image examples styling fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-16 12:51:05 -07:00
Dawood Khan
3618238960
Fix dataframe line_breaks (#5930)
* fix

* format

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-16 11:36:22 -07:00
Yuichiro Tachibana (Tsuchiya)
b67115e8e6
Lite: Make the Examples component display media files using pseudo HTTP requests to the Wasm server (#5627)
* Create a Wasm-compatible <Image> component in @gradio/lite and use it in @gradio/image/example/Image.svelte

* add changeset

* Fix Image styling

* Move js/wasm/svelte/Image.svelte -> js/image/static/Image.svelte

* Shorten CSS class name

* Create Wasm-compatible video components

* add changeset

* Move the Wasm-compatible `Image` from `static` to `shared`

* Create Wasm-compatible audio components

* Fix `resolve_wasm_src()` to return the passed `src` as-is when the URL is not HTTP or refering to remote

* add changeset

* Fix `resolve_wasm_src()`

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-17 01:26:49 +09:00
Jing Yang Fan
4e62b8493d
Ensure websocket polyfill doesn't load if there is already a global.Webocket property set (#5840)
* conditional global variable check

* move conditional to if block

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-16 10:17:46 +01:00
Yuichiro Tachibana (Tsuchiya)
1724918f06
Lite: Add a break statement (#5919)
* Add a break statement

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-16 12:36:53 +09:00
Arnav Kohli
e24163e15a
Added dimensionality check to avoid bad array dimensions (#5915)
* Added dimensionality check to avoid bad array dimensions

Added a simole dimensionality check to keep the code coherent

* lint

* 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-15 19:23:22 -07:00
Dawood Khan
0592c301df
Fix Dataframe line_breaks (#5897)
* fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-15 18:29:39 -07:00
Archit-Kohli
921716f618
Fixed visibility issue for all notebooks on GitHub (#5917)
* fixed visibility error in notebooks in github

* Delete fixNotebooks.py

deleted script used to fix notebooks

* Update generate_notebooks.py

fixed a small bug that prevented visibility of notebooks in GitHub
2023-10-15 18:16:57 -07:00
Yuichiro Tachibana (Tsuchiya)
c4e3a92743
Fix curly brackets in docstrings (#5901)
* Fix curly brackets in docstrings

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-10-15 18:11:35 -07:00
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