Commit Graph

6028 Commits

Author SHA1 Message Date
Philippe Manzano
a3cf90e57b
view_api instead of view_info (#6773) 2023-12-13 09:57:53 -08:00
pngwn
1459119c6e
chore: update versions (#6670)
* chore: update versions

* change

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ali Abid <ubuntu@ip-172-31-25-241.us-west-2.compute.internal>
2023-12-12 18:32:54 -08:00
Freddy Boulton
c9673cacd6
Fix directory-only glob for FileExplorer (#6689)
* Fix glob

* add changeset

* Fix test

* lint

* sort

* Remove empty

* Select directory + test

* Workign fix

* WOrkign fix

* Directory click 😅

* add changeset

* Fix test

* Add dirs

* Select directory + test

* WOrkign fix

* Directory click 😅

* WIP

* add code

* Lint

* Use same color as file icon

* Fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-12 16:39:11 -08:00
aliabid94
6a9151d5c9
Remove progress animation on streaming (#6709)
* changes

* add changeset

* changes

* chagnes

---------

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>
2023-12-12 16:01:40 -08:00
aliabid94
d76bcaaaf0
Fix api event drops (#6556)
* changes

* changes

* add changeset

* changes

* changes

* changes

* changs

* chagnes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes~git push

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* change

* changes

* changes

* changes

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-25-241.us-west-2.compute.internal>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-12 15:24:46 -08:00
Yuichiro Tachibana (Tsuchiya)
67ddd40b4b
Lite v4 (#6398)
* Fix vite.config.js detecting the development mode

* Fix the imports of @gradio/theme in js/app/src/lite/index.ts

* [WIP] Install Pydantic V1 and mock the RootModel class

* Remove Wasm WebSocket implementations

* Move ASGI-HTTP conversion logic from the worker to the worker-proxy so we have fine controls on the ASGI connection at the worker-proxy level for the HTTP stream connection impl in the future

* Fix asgi-types.ts

* Create `WasmWorkerEventSource` and inject the `EventSource` creation in @gradio/client

* Mock Pydantic V2's BaseModel

* Fix Pydantic V1 installation

* Make <ImageUploader /> and <ImagePreview /> Wasm-compatible

* Create `getHeaderValue()`

* Create `<DownloadLink />` for Wasm-compatible download and fix `<ImagePreview />` to use it

* Make `gr.Video()` Wasm-compatible avoiding unnecessary execution of ffprobe

* Move `<DownloadLink />` to @gradio/wasm and use it in `<VideoPreview />` too

* Fix `<DownloadLink />` making `href` optional and adding `rel="noopener noreferrer"`

* Make the download button of `<StaticAudio>` and `<Code />` Wasm-compatible

* Make the download button of `<FilePreview />` Wasm-compatible

* Improve the RootModel mock class for `.model_dump()` and `.model_json_schame()` to work

* Make `<UploadProgress />` Wasm-compatible

* Fix `WorkerProxy.httpRequest()` to use `decodeURIComponent()` to process `path` and `query_string`

* Fix `<InteractiveAudio />` to make its upload feature Wasm-compatible

* [WIP] Revert "Make `<UploadProgress />` Wasm-compatible"

This reverts commit f96b4b7d5e92bb488cfe1939d25063366f714178.

* Fix Image styles

* Fix `<AudioPlayer />`'s `create_waveform()` to be Wasm-compatible

* add changeset

* formatting

* Fix js/image/shared/Image.svelte to render <img> immediately

* Fix js/image/shared/Image.svelte to avoid race condition

* Fix  js/image/shared/Image.svelte

* Fix  js/image/shared/Image.svelte

* Fix js/image/shared/Image.svelte removing unnecessary styles

* Fix js/video/shared/Video.svelte to use the passed  immediately without waiting for the async resolution

---------

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>
2023-12-12 22:10:16 +00:00
Dawood Khan
9a6ff704cd
Fix issue with head param when adding more than one script tag (#6639)
* fix

* Revert "fix"

This reverts commit 86783c834d.

* fix

* add changeset

* fix

* add external js file functionality

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-12 14:00:44 -08:00
Yoann Poupart
28a7aa917f
Mount on a FastAPI app with lifespan manager (#6759)
* initial context manager fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-12 16:40:03 -05:00
pngwn
f3c4d78b71
reload on css changes + fix css specificity (#6738)
* reload on css changes + fix css specificity

* add changeset

* tweak

* fix rollup version

* add changeset

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-12 15:32:38 +00:00
Yuichiro Tachibana (Tsuchiya)
21cfb0acc3
Remove the styles from the Image/Video primitive components and Fix the container styles (#6726)
* Remove the styles from the Image/Video primitive components and Fix the container styles

* add changeset

* Fix image example size styles

* Remove border from image/Example with type=gallery

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 23:15:02 +01:00
多啦b梦
a1b966edf7
Fixed an issue where files could not be filed (#6754)
* Fixed an issue where files could not be filed

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 15:31:34 -05:00
Hannah
3240d042e9
Add editable parameter to Audio (#6745)
* add editable param to audio and add story

* add changeset

* fix test

* fix test again

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 18:42:21 +01:00
Freddy Boulton
21ce721bbd
Custom component gallery (#6477)
* initial commit

* First draft

* add changeset

* better close button

* Improve card

* Switch

* Add code

* Add code

* Use icons folder + snake_case

* lockfile fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 11:59:36 -05:00
Hannah
4d1cbbcf30
Allow passing height and width as string in Blocks.svelte (#6569)
* Allow % string in blocks
Modify docstring in chatbot

* add % height chatbot story

* add changeset

* typo 🥲

* func tweak

* formatting

* add changeset

* add changeset

* add str to height params

* update docstring for height

* Allow passing width as a string
Update width docstrings

* formatting

* add changeset

* add width/height param description

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-11 15:58:04 +01:00
Yuichiro Tachibana (Tsuchiya)
bdf81fead8
Lite: Set the home dir path per appId at each runtime (#6432)
* Set the home dir path per appId at each runtime

* Add a comment

* 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-11 15:31:25 +01:00
Dr. Christoph Mittendorf
9cff3cd856
Update helpers.sh (#6733)
grammer
2023-12-11 12:42:29 +00:00
Dr. Christoph Mittendorf
c6e48c8670
Update test-strategy.md (#6725)
Grammer check and spelling
2023-12-11 12:37:59 +00:00
Dr. Christoph Mittendorf
81710dacf2
Update CONTRIBUTING.md (#6731)
fixing typos
2023-12-11 12:37:19 +00:00
Yuichiro Tachibana (Tsuchiya)
9a5811df92
Fix the download button of the gr.Gallery() component to work (#6487)
* Fix the download button of the `gr.Gallery()` component to work

* Refactoring js/gallery/shared/Gallery.svelte

* Fix `gr.Gallery()` to set `orig_name` for URLs

* Fix Gallery.postprocess()

* Fix `download()` to fallback to `window.open()` when CORS is not allowed

* Fix `gr.Gallery` to leave  as None so it will be replaced with a local cache path and restore the `<a>` tag-based download feature on the frontend

* Align a variable name to its type name

* Fix Gallery's tests

* Fix the frontend test for gallery

* Revert "Fix `gr.Gallery` to leave  as None so it will be replaced with a local cache path and restore the `<a>` tag-based download feature on the frontend"

This reverts commit d754980cc27ded760bfc26df4310f913c2c6944a.

* Revert "Fix Gallery's tests"

This reverts commit 4e2aa3fff1.

* Revert "Fix the frontend test for gallery"

This reverts commit 007caa23e7.

* Fix for linter

* Add a test about the download button

* Fix type defs on Gallery.postprocess

* Improve TestGallery

* add changeset

* Update gradio/components/gallery.py

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

* Update gradio/components/gallery.py

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

* Revert "Update gradio/components/gallery.py"

This reverts commit 4d6e127305.

* Revert "Update gradio/components/gallery.py"

This reverts commit f2bfad0744.

* Use `tuple` instead of `typing.Tuple`

* Revert "Use `tuple` instead of `typing.Tuple`"

This reverts commit 69ab93cad4.

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-09 17:58:19 +01:00
Yuichiro Tachibana (Tsuchiya)
5177132d71
Lite: Fix the isMessagePort() type guard in js/wasm/src/worker-proxy.ts (#6416)
* Fix the `isMessagePort()` type guard in js/wasm/src/worker-proxy.ts

* 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-08 20:32:27 +01:00
Hannah
128ab5d65b
Ensure checked files persist after FileExplorer rerenders (#6691)
* add tree_updated flag

* add changeset

* add changeset

* test

* generate notebooks

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-08 19:27:25 +01:00
Hannah
053bec98be
Improve CSS token documentation in Storybook (#6399)
* remove width and heights from icons

* add changeset

* add global css vars (light)

* add changeset

* add changeset

* Remove component stories (will document these elsewhere)

* remove rtl param in chatbot story for non rtl text

* formatting

* remove redundant class

* add changeset

* fix row story

* fix broken groot file stories

* revert lock changes

* add changeset

* lockfile

* pnpm lock

* remove colour from webcam icons

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-08 16:23:14 +01:00
renovate[bot]
6b1401c514
chore(deps): update dependency marked to v11 (#6603)
* chore(deps): update dependency marked to v11

* add changeset

* fixes

* add changeset

* tweaks

* tweaks

* tweaks

---------

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>
Co-authored-by: pngwn <hello@pngwn.io>
2023-12-08 11:32:42 +00:00
pngwn
e90c5fc306
ignore vite pkgs (#6706) 2023-12-08 10:21:36 +00:00
Abubakar Abid
24e048196e
Hotfix: update huggingface_hub dependency version (#6704)
* update requirements of hfhub

* add changeset

* requirements

* add changeset

* fixed

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-07 15:07:23 -08:00
Lucain
9a0bd27502
Add support for OAuth tokens (#6616)
* Add support for OAuth tokens

* cleaner doc

* add changeset

* format backend

* Apply suggestions from code review

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

* more

* Refactor mocked oauth profile

* fix

* fix

* format

* bump session secret

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-07 12:37:38 -08:00
renovate[bot]
95827bbe6e
Update dependency @sveltejs/vite-plugin-svelte to v3 (#6654)
* Update dependency @sveltejs/vite-plugin-svelte to v3

* 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-07 20:22:19 +00:00
renovate[bot]
c9c1514c6e
chore(deps): update actions/setup-python action to v5 (#6685)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-07 12:15:36 -08:00
Freddy Boulton
d95d647894
Fix tests (#6701) 2023-12-07 14:22:16 -05:00
Freddy Boulton
fe40308894
Rotate Images to Upright Position in preprocess (#6676)
* Code

* add changeset

* remove comment

* Add back try except

* Add code

* Use warning

* Use warning

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-07 13:16:48 -05:00
Hannah
798eca524d
Fit video media within Video component (#6698)
* Add mirror-wrap styling in Player.svelte

* add changeset

* add vertical video story

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-07 18:19:09 +01:00
Abubakar Abid
dfc61ec4d0
Fix dropdown blur bug when values are provided as tuples (#6694)
* fix dropdown blur bug

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-07 08:03:11 -08:00
Abubakar Abid
cfd57005bc
Cause gr.ClearButton to reset the value of gr.State (#6680)
* state

* note

* add changeset

* buttons

* clear button

* lint

* if

* clear'

* reset state

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-06 17:35:19 -08:00
D V
8a70e83db9
switch from black to ruff formatter (#6543)
* migrate from black to ruff

* fix script and dependencies

* applying ruff

* add changeset

* add changeset

* address ruff feedback

* replace linter

* fixed typing

* fix typing

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-06 15:16:32 -08:00
Abubakar Abid
5d5ab8c73c
perf guide (#6673) 2023-12-06 09:18:09 -08:00
Freddy Boulton
1086542f17
Render each app in the PR's spaces preview in a separate page (#6657)
* Use template response

* minor fix

* Return type hint

* add changeset

* Remove return types

* response_class=None

* Use relative path

* SPA

* remove pydantic pin

* Revert

* delete changeset

* Overflow hidden on body

* text gray

* Collapsible sidebar

* max-height

* Use search params

* document.location.search

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-06 10:53:16 -05:00
aisensiy
30c9fbb5c7
Set gradio api server from env (#6666)
* Use GRADIO_API_SERVER env

* Format the code

* add changeset

* Use env GRADIO_SHARE_SERVER_ADDRESS as default share_server_address

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-05 18:09:42 -08:00
Abubakar Abid
51b54b3411
Tweak to our bug issue template (#6677)
* template

* add timeouts

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-05 18:05:52 -08:00
Ali Abdalla
abe9785c50
Remove Discourse Forum Link from Website (#6679)
* remove forum link

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-06 01:52:05 +00:00
cswamy
7cbf96e0bd
Issue 5245: consolidate usage of requests and httpx (#6598)
* issue 5245 commit 1

* formatted

* add changeset

* fixes

* fixes

* make changes in client too

* remove requests from client

* add changeset

* add changeset

* Fixes to test_utils.py in client

* fixes in client utils.py and test_utils.py

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-05 14:18:09 -08:00
Abubakar Abid
1234c3732b
use gr.Error for audio length errors (#6672)
* use gr.Error for audio length errors

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-05 13:15:16 -08:00
Abubakar Abid
299f5e238b
Update HF token used in CI tests (#6671)
* fix tests

* format

* fixes

* add changeset

* fixes

* fix

* fix

* update

* update

* test client

* format

* hf token 2

* add changeset

* add env

* add envs

* tests

* env

* fixes

* test external

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-05 12:49:48 -08:00
Freddy Boulton
523805360b
Fix reload mode warning about not being able to find the app (#6660)
* Fix warning

* add changeset

* Use *

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-05 13:25:40 -05:00
pngwn
fce80ac804
chore: update versions (#6575)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-12-04 16:14:12 -08:00
Ali Abdalla
d59ceec99d
Removes smooth scrolling from website (#6650)
* smooth scrolling with css

* add changeset

* formatting

* remove smooth scrolling

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-12-04 23:43:52 +00:00
Abubakar Abid
98b15c24a5
format (#6658) 2023-12-04 14:37:04 -08:00
Freddy Boulton
d92c819419
Add concurrency_limit to ChatInterface, add IDE support for concurrency_limit (#6653)
* concurrency limit chat interface

* 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>
2023-12-04 17:19:53 -05:00
renovate[bot]
19c9d26522
chore(deps): update chromaui/action action to v10 (#6618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 14:04:19 -08:00
renovate[bot]
687a7ff6ea
chore(deps): update dependency chromatic to v10 (#6619)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 14:03:35 -08:00
Hannah
8fc562a8ab
Add show_recording_waveform to Audio (#6551)
* add show_recording_waveform

* add changeset

* add animation

* Refactor audio component and waveform options

* formatting

* add margin before audio controls

* amend default values

* expose gr.WaveformOptions

* Tweak waveform options types and handle none

* add waveform_options to reverse_audio

* tweak bool typing

* notebook

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-12-04 14:00:51 -08:00