Commit Graph

1074 Commits

Author SHA1 Message Date
Abubakar Abid
34510db468
Allow HTML in alert modals (#8817)
* success

* add changeset

* add changeset

* link styling

* sanitize

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-17 08:33:14 -07:00
Abubakar Abid
a3d23b43e7
Add loop parameters to gr.Audio and gr.Video (#8806)
* add loop

* changes

* add changeset

* audio player

* fix tests

* test audio

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-16 22:05:59 -07:00
Yuichiro Tachibana (Tsuchiya)
1d09925469
Fix Lite's <Playground /> (#8804)
* Fix Playground.svelte to use BaseCode instead of Code

* Remove unnecessary <div>s

* Fix typing error_display

* Make <Code>'s readonly prop reactive and fix <Playground /> to use it

* Fix to attach the event listener to a specific DOM element in the <Playground \> component

* Remove unused line

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-17 10:18:09 +09:00
Abubakar Abid
aa4b7a7192
Improve styling of parameter tables in the docs (#8618)
* param table

* add changeset

* add changeset

* format

* add changeset

* styling changes

* rename initialization to parameters

* event listener styling

* remove

* add changeset

* fixes

* format

* changes

* changes

* revert svx

* add changeset

* revert svx

* revert

* changes

* changes

* functiondoc

* undo

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-16 15:53:04 -07:00
pngwn
7b19474cb2
Ensure ImageEditor brush color can be updated with gr.update (#8802)
* fix brush

* add changeset

* fix brush

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-16 19:43:29 +01:00
Ali Abdalla
0b9e870f9c
Hide embedded components while loading (#8773)
* styling

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-15 19:12:34 +00:00
Abubakar Abid
4030f28af6
Allows updating the dataset of a gr.Examples (#8745)
* helpers

* add changeset

* changes

* add changeset

* changes

* tweak

* format

* example to docs

* add changeset

* fixes

* add tuple

* add changeset

* print

* format

* clean'

* clean

* format

* format backend

* fix backend tests

* format

* notebooks

* comment

* delete demo

* add changeset

* docstring

* docstring

* changes

* add changeset

* components

* changes

* changes

* format

* add test

* fix python test

* use deep_equal

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-15 09:19:52 -07:00
pngwn
d51dd2ce17
chore: update versions (#8767)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-12 12:48:12 -07:00
pngwn
2b4636e75c
Fix width of assistant's chatbot bubble (#8766)
* fix width

* add changeset

* format

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-12 19:38:26 +00:00
pngwn
1b74e214b9
chore: update versions (#8663)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-12 11:54:28 -07:00
pngwn
26cdd0ffe0
Revert chatbot styling (#8758)
* fix

* fix

* add changeset

* add changeset

* tests

* Fix button panel (#8762)

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2024-07-12 18:35:08 +01:00
pngwn
078663a3a4
Fix issue with virtual module in custom components (#8761)
* fix bug

* add changeset

* fix really

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-12 18:34:41 +01:00
pngwn
c1ecfde50e
8394 df hidden items (#8763)
* fix bug

* fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-12 18:19:43 +01:00
Freddy Boulton
5e36144232
Add guides for msg format and llm agents (#8750)
* Add guides

* add changeset

* Add code

* Add code

* Add notebook

* rename msg_format to type

* Fix docs

* notebooks

* missing link

* Update guides

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-12 11:53:28 +00:00
Dawood Khan
d21d8ee0cf
Fixes Plotly is rendered smaller in a hidden gr.Tab (#8740)
* resize

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-11 19:11:03 -07:00
Yuichiro Tachibana (Tsuchiya)
077743c456
Refactoring <gradio-lite /> component making the code simpler and fixing a Playground mode bug (#8693)
* Create <LiteIndex /> component that contains the initialization logic and manages <Index /> and <Playground />

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-11 19:00:01 -07:00
aliabid94
1500b89e13
Allow app to fill width (#8651)
* changes

* add changeset

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-11 12:53:36 -07:00
Hannah
31a876d027
Fix Share to community button for images (#8737) 2024-07-11 18:15:53 +01:00
Dawood Khan
0482453fd5
Chatbot LaTeX Crash Fix (#8658)
* latex fix

* format

* add changeset

* fix demo (#8696)

* Better spacing for codeblocks on docs (#8686)

* styling for codeblocks

* add changeset

* formatting

* add changeset

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Add search to website (#8624)

* Update action.yml (#8702)

* Model3D point cloud and wireframe display modes (#8687)

* display modes

* add changeset

* test fixes

* lint

* Update gradio/components/model3d.py

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

* solid

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Fix playground to display errors (#8689)

* Fix the Playground on the website to trigger run_code() and install() with debounce and to display errors

* Remove an unused function, make_full_screen()

* Format demo/hello_world/run.py

* Update notebook

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environme… (#8705)

* GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environment variables

* GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environment variables

* add changeset

* Document GRADIO_ALLOWED_PATHS and GRADIO_BLOCKED_PATHS

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Ensure JS client `status_callback` functionality works and improve status messages (#8699)

* * bind handle_space_success
* ensure status callbacks work correctly

* add changeset

* test fixes + refactor

* tweak

* test

* Revert "test"

This reverts commit db1afc40b4.

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Documents auth in the guides, in the view API page, and also types the Blocks.config object  (#8720)

* auth docs

* changes

* add changeset

* add changeset

* add changeset

* type

* changes

* snippets

* import

* add changeset

* changes

* fix typing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* remove on mount

* merge

* remove onmount

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
Co-authored-by: cocktailpeanut <121128867+cocktailpeanut@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-07-11 12:28:27 -04:00
Yuichiro Tachibana (Tsuchiya)
3a6142fa48
Lite load perf ci (#8222)
* Update Lite E2E test setup to measure the performance of the initial app loading

* [TMP] Run test-functional on this branch

* Update CI to read the perf result

* add changeset

* Comment the performance result

* [TMP] hardcode the PR number to test posting the comment

* Revert "[TMP] hardcode the PR number to test posting the comment"

This reverts commit 4270dac77c.

* Revert "Comment the performance result"

This reverts commit df4c29fcda.

* Add debug echo

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-11 08:30:05 -07:00
Hannah
1b5b5b0b43
Bind fetch and stream in JS client (#8714)
* bind `fetch` and `stream`

* add changeset

* add tests

* tweak

* fix test

* test

* tweak .close() logic

* add changeset

* format

* change fake word

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-11 14:35:56 +00:00
Freddy Boulton
a9307c6452
Chatbot generating scroll and click fix (#8748) 2024-07-11 15:10:55 +02:00
pngwn
e834d302e4
ensure @gradio/client always returns the correct data (#8716)
* ensure data is alwat returned as expected

* add changeset

* update test data

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-11 13:15:10 +01:00
Freddy Boulton
740364e5ce
Add guide on best practices for ZeroGPU limits with the python client (#8656)
* Add guide

* typos

* add changeset

* add changeset

* styling and fix bad id

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-07-11 10:58:05 +02:00
aliabid94
e3c7079e38
gr.DateTime component (#8713)
* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* Update gradio/components/datetime.py

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

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-10 20:55:45 -07:00
Abubakar Abid
b736c8db34
Refactor gr.ParamViewer to use HTML <details> and other tweaks (#8744)
* changes

* changes

* revert demo change

* add changeset

* changes

* format

* fixes

* param viewer

* update demo

* add changeset

* docstrings

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-10 17:58:28 -07:00
Abubakar Abid
fb0daf3730
Improvements to gr.Examples: adds events as attributes and documents, them, adds sample_labels, and visible properties (#8733)
* events

* examples

* add changeset

* format

* add changeset

* add changeset

* format

* changes

* Update gradio/components/dataset.py

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

* Update gradio/helpers.py

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

* add test

* Update test/test_helpers.py

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

* changes

* format

* add to interface as well

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-07-10 16:35:36 -07:00
Freddy Boulton
4221290d84
Support Message API for chatbot and chatinterface (#8422)
* first commit

* Add code

* Tests + code

* lint

* Add code

* notebook

* add changeset

* type

* Add client test

* type

* Add code

* Chatbot type

* Add code

* test chatbot

* fix e2e test

* js tests

* Consolidate Error and Tool message. Allow Messages in postprocess

* Rename to messages

* fix tests

* notebook clean

* More tests and messages

* add changeset

* notebook

* client test

* Fix issues

* Chatbot docs

* add changeset

* Add image

* Add img tag

* Address comments

* Add code

* Revert chatinterface streaming change. Use title in metadata. Address pngwn comments

* Add code

* changelog highlight

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-10 11:08:06 +00:00
Abubakar Abid
936c7137a9
Documents auth in the guides, in the view API page, and also types the Blocks.config object (#8720)
* auth docs

* changes

* add changeset

* add changeset

* add changeset

* type

* changes

* snippets

* import

* add changeset

* changes

* fix typing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-08 18:58:07 -07:00
Yuichiro Tachibana (Tsuchiya)
edcd5748f6
Fix playground to display errors (#8689)
* Fix the Playground on the website to trigger run_code() and install() with debounce and to display errors

* Remove an unused function, make_full_screen()

* Format demo/hello_world/run.py

* Update notebook

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-05 16:37:27 +09:00
Dawood Khan
bc1d45d874
Model3D point cloud and wireframe display modes (#8687)
* display modes

* add changeset

* test fixes

* lint

* Update gradio/components/model3d.py

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

* solid

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-04 14:06:41 -07:00
Ali Abdalla
ba59bb824f
Add search to website (#8624) 2024-07-03 21:57:11 -07:00
Ali Abdalla
64ac05b111
Better spacing for codeblocks on docs (#8686)
* styling for codeblocks

* add changeset

* formatting

* add changeset

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-03 16:46:23 -07:00
Abubakar Abid
c946c6f31a
Allow supplying custom gr.Chatbot with events to gr.ChatInterface (#8677)
* allow chatbot.like

* changes

* add changeset

* add to docs

* add to docs

* fix

* fix

* add changeset

* add changeset

* move to chatinterface docs

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-02 14:13:33 -04:00
Gina Wu
3b8238c2e2
Add c/cpp code support (#8665)
* Add c/cpp code support

* lint

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-01 11:44:50 +00:00
aliabid94
2943d6d688
Add Timer component (#8505)
* chagnes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* change

* add docs

* add changeset

* remove demo

* add changeset

* add changeset

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* Update gradio/components/timer.py

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

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-06-28 16:53:44 -07:00
pngwn
12f81fcaed
chore: update versions (#8622)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-28 12:39:54 -04:00
Dawood Khan
c34839293f
Multimodal textbox buttons alignment (#8637)
* button spacing

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-28 12:04:27 -04:00
Hannah
9b8840ab5f
Ensure chatbot messages are visible to screenreaders (#8631)
* fix aria label for message.type

* add changeset

* tweak

* improve aria-label for files

* copy tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-28 12:03:44 -04:00
pngwn
3896398480
Ensure copy button on chatbot shows when appropriate (#8655)
* fix copy button

* add changeset

* fix boolean logic

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-28 12:26:37 +00:00
Freddy Boulton
c12f82a36d
Bugfix: Allow multiple files to be uploaded via multimodal textbox (#8608)
* Add code

* Add file_count parameter to MultimodalTextbox

* add changeset

* Update fresh-years-feel.md

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-26 12:14:25 -04:00
Ali Abdalla
4c6e4e0ba9
Fix CORS issues with Lite Component Demos (#8623)
* fix erros

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-25 22:36:58 -07:00
Abubakar Abid
b6fa6b543f
Add docs for .on(), .then(), and .success(), as well as the subclasses of gr.EventData (#8604)
* more helpers

* add changeset

* add changeset

* lint

* trigger list

* add example

* docstring

* dependency

* add changeset

* events

* document subclasses

* fix syntax

* event data svx

* add changeset

* selectdata

* lint

* key up data

* 2 more

* on

* other placeholders

* lint

* address reviews

* tweak

* Update js/_website/src/lib/templates/gradio/04_helpers/01_eventdata.svx

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

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-06-26 03:14:07 +00:00
pngwn
8d425ee777
chore: update versions (#8613)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-25 12:18:25 -04:00
pngwn
4cfb6eebf6
chore: update versions (#8523)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-25 11:54:46 -04:00
aliabid94
affce4cbd9
Fix resizer on altair (#8603)
* changes

* add changeset

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-25 11:09:38 -04:00
pngwn
c7cd0a0e9a
Ensure chatbot background is consistent with other components (#8607) 2024-06-25 11:37:23 +01:00
Ali Abdalla
fe83e6445a
Small fix to guide styling (#8605) 2024-06-25 02:52:12 -07:00
Freddy Boulton
ca125b728a
Fix reload mode for jupyter notebook and stateful demos (#8599)
* Remove deprecated method

* add changeset

* Fix bug

* Update test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-25 00:36:36 -04:00
aliabid94
65afffd34b
Fix multimodal chat look (#8590)
* changes

* add changeset

* changes

* changes

* changes

* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-24 16:43:25 -07:00
pngwn
530f8a0b05
chatbot component tweaks (#8594) 2024-06-24 21:41:06 +00:00
Abubakar Abid
d35c290aad
Adding more docs for using components in chatbot (#8593)
* adding more docs for components in chatbot

* add changeset

* add changeset

* add simple demo

* simple demo

* notebook

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-21 18:04:27 +00:00
pngwn
7fc7455553
support html in chatbot (#8555) 2024-06-21 09:17:25 +01:00
pngwn
900cf25256
Ensure frontend functions work when they don't return a value (#8521) 2024-06-21 09:17:10 +01:00
Abubakar Abid
34430b934d
Handle GIFs correct in gr.Image preprocessing (#8589)
* handle gifs correct in image preprocessing

* add changeset

* fix

* add test

* add test

* docstring

* add docs

* image

* revert

* change

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-20 23:25:42 +00:00
aliabid94
797621b81a
Improved plot rendering (#8580)
* changes

* add changeset

* add changeset

* add changeset

* changes

* changes

* restore altair

* changes

* changes

* changes

* changes

* changes

* changes

* Update twenty-jokes-argue.md

* changes

* chanegs

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-20 23:09:04 +00:00
baojianting
a77877f62d
First time loading performance optimization (#8571)
* performance: add gradio_api_info

* format code

* fix ts check

* fix ts check

* add changeset

* add changeset

* format globals.d.ts

---------

Co-authored-by: jianting.bjt <jianting.bjt@alibaba-inc.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-06-20 09:38:40 +01:00
Abubakar Abid
a1c21cb69a
fix dataset update (#8581)
* fix dataset update

* revert'

* add changeset

* add test

* add changeset

* changes

* add template

* add changeset

* fix docstring

* test postprocessing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-19 23:00:57 +00:00
Shruti Agarwal
2b0c1577b2
Added an optional height and overflow scrollbar for the Markdown Component (#8528)
* scrollable-markdown-changes-added

* made suggested changes

* added a new story in Storybook

* add changeset

* add changeset

* tweaks

* changes

* changes

* revert example change

* tweaks

* demo changes

* more tweaks

* formatting

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-19 14:07:21 -04:00
Ali Abdalla
ed82a6237e
Bring back embedded demos on component docs (#8557)
* add component demos

* formatting

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-18 23:59:43 -07:00
Yuichiro Tachibana (Tsuchiya)
6f99a028ed
Upgrade pyodide 0.26 (#8569)
* Update Pyodide to 0.26.0

* Update Pyodide to 0.26.1

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-18 15:38:00 +09:00
pngwn
483ecaae62
fix website build (#8559)
* fiux

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-15 09:44:57 +00:00
Dawood Khan
bb504b4949
Gradio components in gr.Chatbot() (#8131)
* chatbot components

* demoi

* add changeset

* preprocess fix

* add changeset

* Make guide for tailwind more verbose (#8152)

* Lite wheel optimization (#7855)

* Add `pull_request.branches.main` as a trigger of the `publish` workflow

* [WIP] Comment out the publish steps

* Package and upload the NPM package for debug

* Skip the copy_frontend.py hook in the Lite build

* add changeset

* [WIP] Show gradio files

* [WIP] Show gradio files

* Comment out installing the gradio and gradio_client libraries

* Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows

* Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows

* Add code

* Revert "[WIP] Show gradio files"

This reverts commit e15fef29bd14671576e64d94d3b844786ebe7e83.

* Build the gradio wheel with the custom lite target

* add changeset

* Revert "[WIP] Show gradio files"

This reverts commit aef053f9caad203c7e1bbfa15e9f9e536f77442a.

* Revert "Skip the copy_frontend.py hook in the Lite build"

This reverts commit ca296d0e4e169adbb6af3705561869aa8c9037b7.

* Update .github/actions/install-frontend-deps/action.yml for hatch installation

* [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch

* Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch"

This reverts commit 571823b4a05f7e41e0b3731d51c5bd86b2e17ddc.

* Comment-in lines in publish.yml

* Move Lite build from publish.yml to deploy-spaces.yml

* Use the build_lite option of install-all-deps instead of running the build command

* [TMP] Change the branch of action files

* Fix the hatch Lite build setting

* Return pnpm pack to deploy-space

* Revert "[TMP] Change the branch of action files"

This reverts commit fe4e1c8f210eb21ac7ee1bd4b219d35e1ae84c85.

* Remove dependencies for lite build

* [TMP] Change the branch of action files

* Revert "Remove dependencies for lite build"

This reverts commit 856a858c1f49d736bfeb056ba0ec7e9bc35af29c.

* Install packaging>=23.2

* [TMP] Show packaging version

* Fix pip install

* Fix

* Uninstall packaging once

* Use `pip install -U` instead of uninstalling the exiting version

* Revert "[TMP] Show packaging version"

This reverts commit 910b6bbde3dc8777c051bd5576813913d57959f7.

* Add `-U` flag

* Set packaging version as >=23.2

* Revert the changes on pip install

* Set packaging version as >=23.2 in requirements.txt

* Revert "Set packaging version as >=23.2"

This reverts commit 8aa77c8930815e69d7256886cad88b6da8361069.

* Fix hook name

* Revert "Set packaging version as >=23.2 in requirements.txt"

This reverts commit fbd605cbfb5d06706eacc0648a2e9d7816c9de1f.

* Revert "Revert the changes on pip install"

This reverts commit 81ff38a660635fce9cb17862a2072e4d169c3466.

* Add comments

* Revert "[TMP] Change the branch of action files"

This reverts commit 0d6aa48d75a842db9b3987212deffedb0c0ca51d.

* Revert the trigger of .github/workflows/deploy-spaces.yml

* Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action

* [TMP] Trigger CI based on this PR

* Remove packging installation

* Revert "Remove packging installation"

This reverts commit 4a4f18de3a.

* Revert "[TMP] Trigger CI based on this PR"

This reverts commit 6cea830c8e.

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>

* Add ETag to `/custom_component` route to control browser caching (#8170)

* Add code

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Implement JS Client tests (#8109)

* add msw setup and initialisation tests

* add changeset

* add walk_and_store_blobs improvements and add tests

* add changeset

* api_info tests

* add direct space URL link tests

* fix tests

* add view_api tests

* add post_message test

* tweak

* add spaces tests

* jwt and protocol tests

* add post_data tests

* test tweaks

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Remove hatch installation in js/app/package.json which is no longer needed (#8174)

* Remove hatch installation in js/app/package.json which is no longer needed

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Update test-functional.yml - Fix vulnerability code injection (#8145)

* Update test-functional.yml

* Update test-functional.yml

* tweaks

---------

Co-authored-by: pngwn <hello@pngwn.io>

* rework upload to be a class method + pass client into each component (#8179)

* rework upload to be a class method + pass client into each component

* add changeset

* Update client/js/src/utils/upload_files.ts

* fix storybook

* review comments

* Apply suggestions from code review

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

* format

* ts fix

---------

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

* chore(deps): update pnpm to v9 (#8123)

* chore(deps): update pnpm to v9

* update workflow

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>

* Use workspace version for code in _website (#8189)

* workspace

* add changeset

* remove circular import from preview

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Pass Error status in /dev/reload stream (#8106)

* get error message

* Support multiple clients

* add changeset

* add changeset

* add changeset

* Display in UI

* console.error the python traceback

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Convert sse calls in client from async to sync (#8182)

* convert sse calls in client from async to sync

* add changeset

* more sync

* lint

* more sync

* fix threadpool

* fix timeouts

* reuse executor

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* run python reload only if python file changed (#8194)

* run python reload only if python file changed

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>

* fix: handling SIGINT correctly in reload.py, single entrance of block_thread in blocks.py (#8158)

* fix: handling SIGINT, single block_thread and fix popen

* Use pass

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>

* Add eventsource polyfill for Node.js and browser environments (#8118)

* add msw setup and initialisation tests

* add changeset

* add eventsource polyfill for node and browser envs

* add changeset

* add changeset

* config tweak

* types

* update eventsource usage

* add changeset

* add walk_and_store_blobs improvements and add tests

* add changeset

* api_info tests

* add direct space URL link tests

* fix tests

* add view_api tests

* add post_message test

* tweak

* add spaces tests

* jwt and protocol tests

* add post_data tests

* test tweaks

* dynamically import eventsource

* revet eventsource imports

* add node test

* lockfile

* add client test in root pkg file

* lcokfile

* remove eventsource from js/app

* add changeset

* remove ts ignore

* move eventsource polyfill to eventsource factory

* add changeset

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Ensure connectivity to private HF spaces with SSE protocol (#8181)

* add msw setup and initialisation tests

* add changeset

* add eventsource polyfill for node and browser envs

* add changeset

* add changeset

* config tweak

* types

* update eventsource usage

* add changeset

* add walk_and_store_blobs improvements and add tests

* add changeset

* api_info tests

* add direct space URL link tests

* fix tests

* add view_api tests

* add post_message test

* tweak

* add spaces tests

* jwt and protocol tests

* add post_data tests

* test tweaks

* dynamically import eventsource

* revet eventsource imports

* add jwt param to sse requests

* add stream test

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Support custom components in gr.load (#8200)

* Add code

* add changeset

* Update fuzzy-mirrors-scream.md

* Update fuzzy-mirrors-scream.md

* Fix tests

* Update .changeset/fuzzy-mirrors-scream.md

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

* Fix code

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Refactor analytics to not use api.gradio.app (#8180)

* Analytics refactor

* add changeset

* add changeset

* Fix wasm?

* Fix python tests'

* Revert changes chrome

* use util function

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet (#8204)

* Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet

* add changeset

* Refactoring

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Set the show_api flag on Lite (#8205)

* Set the show_api flag on Lite

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (#8052)

* Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (wip: only object-detection in this commit)

* add changeset

* Add image-classification and image-segmentation

* Add zero-shot-image-classification and zero-shot-object-detection

* Add document-question-answering

* Add feature-extraction and fill-mask

* Add question-answering and summarization

* Fix an error message

* Add text2text-generation, text-classification, and text-generation

* Add translation andtranslation_xx_to_yy

* Add zero-shot-classification

* Add postprocess_takes_inputs to control the args passed to the postprocess function of each pipeline

* Add topk option to image-classification

* format_backend

* Add audio-classification, automatic-speech-recognition, and zero-shot-audio-classification

* Add image-to-text

* Add token-classification (with JSON component as an output. Is it correct?)

* Ignore import type failure of transformers_js_py

* Add image-feature-extraction

* Add image-to-image

* Add text-to-audio

* Add depth-estimation

* Remove `render=False`

* Reorder the if-blocks following the Transformers.js doc

* Update gradio/pipelines_utils.py

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

* Update gradio/pipelines_utils.py

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

* Fix feature-extraction demo

* Fix demo title

* Add guides/08_gradio-clients-and-lite/gradio-lite-and-transformers-js.md without contents

* Rename guides/08_gradio-clients-and-lite/*.md to fix the order

* Use pipeline.model.config._name_or_path for the demo title instead of pipeline.model.config.model_type

* Fix normal Interface.from_pipeline to use pipeline.model.config.name_or_path as the demo title

* Write an article about Gradio-Lite and Transformers.js

* Update the doc

* tweaks

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* merge

* allow the canvas size to be set on the `ImageEditor` (#8127)

* add canvas size kwarg to imageeditor

* add changeset

* fix tests

* fix cropsize

* changes

* notebooks

* update docstrings

* fix type

* fix undefined dimensions

* Update image_editor.py

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

* fix type

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Rename `eventSource_Factory` and `fetch_implementation` (#8209)

* rename eventSource_factory -> stream_factory + rename event_source -> steam

* rename fetch_implementation -> fetch

* rename fetch to _fetch due to global.fetch conflict

* add changeset

* format

* format

* format

* format

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* remove redundant event source logic (#8211)

* remove redundant event source logic

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Only connect to heartbeat if needed (#8169)

* Add connect_heartbeat field

* fix types

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* chore: update versions (#8172)

* fixes

* type fixes

* type fixes

* notebook fix

* type ignore

* data object model

* remove component in tuple

* more fixes

* extend components

* remove test var

* extend to all components backend

* remove loading data models

* conflict fix

* test and type fixes

* playwright test

* PR fixes

* final changes

* Add pltly for 2e2 test

* pass loader to Gradio helper class

* fix things

* add changeset

* checks

* more fixy

* more fixy

* more fixy

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Simon Duerr <dev@simonduerr.eu>
Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Lê Ngọc Hoa <114990730+h2oa@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: James Zhou <61927718+jameszhou02@users.noreply.github.com>
Co-authored-by: Tiger3018 <tiger3018of02@gmail.com>
2024-06-14 14:43:35 +00:00
Freddy Boulton
7fc0f5149b
Fix reload mode by implementing close on the client (#8548)
* Fix reload mode

* add changeset

* reload test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-13 17:35:33 -04:00
Freddy Boulton
88de38e259
Fix custom components on windows (#8531)
* Fix usability windows

* Add config.js

* Add code

* revert pnpm.lock'

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-13 17:26:57 -04:00
Freddy Boulton
a4433be25c
Ability to disable orange progress animation for generators (#8543)
* Add code

* deletion

* add changeset

* add changeset

* Update nasty-actors-kick.md

Update changelog

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-12 19:46:29 +00:00
Ali Abdalla
81ae7663b3
Many small fixes to website and docs (#8537)
* change banner

* replace Sequence with list

* fix capitilization issues in nav

* fix demo for gr.Examples

* show respective install from main commands for clients

* only upload versioned demos on a new version release

* formatting

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-12 11:15:09 -07:00
Freddy Boulton
c2a0d056d6
Control Display of Error, Info, Warning (#8489)
* first draft

* handle animation

* No animation

* Add code

* add changeset

* Only use duration

* lint

* lint

* Add docs

* add changeset

* Fix default

* sample usage

* formatting

* Add visible parameters

* float

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-06-11 23:27:59 +00:00
pngwn
546d14e4f2
add test + demo (#8524) 2024-06-10 21:33:28 +01:00
pngwn
595ecf35da
Add build target option to the custom component gradio.config.js file (#8520) 2024-06-10 20:16:41 +01:00
Ali Abdalla
de6aa2b676
Add helper classes to docs (#8516)
* add brush and eraser to imade editor

* add waveformoptions

* formatting

* add changeset

* formatting backend

* fix event matrix

* fixes

* fixes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-10 09:05:57 -07:00
pngwn
18a5e0e162
chore: update versions (#8497)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-09 09:48:41 -07:00
aliabid94
c5f6e7722a
Cache break themes on change (#8499)
* changes

* add changeset

* changes

* add changeset

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-09 08:31:03 -07:00
Ali Abdalla
ffd53fa2dc
Remove broken guide redirect (#8491)
* remove broken redirect

* add changeset

* remove upload dependency

* add changeset

* lockfile

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-07 13:12:41 -07:00
Freddy Boulton
3a5d56ea7b
Add Client Release Notes to Docs (#8487)
* Add file

* add changeset

* Add tweaks

* add changeset

* fix bullet stylign

* lint

* Add example

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-06-07 18:21:19 +00:00
pngwn
a2cd8a9838
chore: update versions (#8486)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 08:37:53 -07:00
pngwn
f9406b46e3
chore: update versions (#8482)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 08:15:46 -07:00
pngwn
b301ce418b
chore: update versions (#8458)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 07:06:28 -07:00
Ali Abdalla
8ca93d45dd
Improve design of api recorder (#8473)
* better api recorder buttons

* better banner

* formatting

* add changeset

* add changeset

* fix functional tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-06-06 12:55:21 +00:00
pngwn
9d2d6051ca
Change client submit API to be an AsyncIterable and support more platforms (#8451)
* fix param name

* format

* save

* changes

* changes

* fix param name

* format

* switch to async iterable interface

* switch to async iterable interface

* changes

* add changeset

* fix

* fix param name

* format

* fixes

* fix checks

* fix checks

* add changeset

* fix checks

* add changeset

* add changeset

* fix checks

* fix param name

* format

* fix types

* cleanup comments

* add changeset

* fix param name

* format

* changes

* Refactor Cancelling Logic To Use /cancel (#8370)

* Cancel refactor

* add changeset

* add changeset

* types

* Add code

* Fix types

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* fix param name

* format

* changes

* fix

* fix param name

* format

* fix test

* fix notebooks

* fix type

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2024-06-06 13:16:14 +01:00
aliabid94
8c18114495
changes (#8469)
Co-authored-by: Ali Abid <aliabid94@gmail.com>
2024-06-06 11:08:14 +01:00
Ali Abdalla
a9e6595817
Tweak meta titles and descriptions for clients (#8471)
* tweak title and description for client

* fix title/desc for js client

* formatting

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-05 18:21:35 -07:00
Ali Abdalla
86288993d9
Support Bash in Api Recorder (#8460)
* add bash to api recorder

* formatting

* add changeset

* fix copy bug

* remove current_language from api banner

* add changeset

* use awk and read

* separate over multiple lines

* fix line spacing

* update guide

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-06-05 23:17:58 +00:00
Freddy Boulton
48eeea4eaa
Refactor Cancelling Logic To Use /cancel (#8370)
* Cancel refactor

* add changeset

* add changeset

* types

* Add code

* Fix types

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-05 15:32:24 -04:00
pngwn
96d8de2312
add delete event to File component (#8417)
* fix param name

* format

* add delete event to File component

* fix

* add changeset

* fix

* fix

* fix

* add changeset

* format

* add changeset

* file file layout

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-05 12:14:10 +00:00
Hannah
63d36fbbf4
Handle gradio apps using state in the JS Client (#8439)
* send `null` for each `state` param in space api

* add changeset

* test

* remove state value from payload from server

* tweak

* test

* test

* Revert "test"

This reverts commit 182045ec7c.

* Revert "test"

This reverts commit 70e074dfdd.

* fixes

* add changeset

* fixes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-06-05 11:53:06 +02:00
Abubakar Abid
5c8915b113
Add cURL to view API Page and add a dedicated Guide (#8445)
* curl docs

* add changeset

* curl

* guide complete

* rename

* more details

* add changeset

* add changeset

* Update guides/08_gradio-clients-and-lite/03_querying-gradio-apps-with-curl.md

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

* Update guides/08_gradio-clients-and-lite/03_querying-gradio-apps-with-curl.md

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

* changes

* add support for curl in view api docs

* add support for files

* format frontend

* lint

* Update js/app/src/api_docs/img/bash.svg

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

* remove api recorder on bash

* fixes

* changes

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-06-05 01:32:13 +00:00
Abubakar Abid
2cd02ff3b7
Remove deprecated parameters from Python Client (#8444)
* deprecate

* add changeset

* file -> handle_file

* more updates

* format

* add changeset

* fix connect

* fix tests

* fix more tests

* remove outdated test

* serialize

* address review comments

* fix dir

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-05 00:26:28 +00:00
pngwn
3dbce6b308
chore: update versions (#8443)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-04 17:07:46 -07:00
Ali Abdalla
881f11c862
Add website banner for clients launch (#8456)
* add banner

* add changeset

* add changeset

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-04 22:55:22 +00:00
Dawood Khan
a970589cf5
Fix multimodal textbox placeholder (#8455)
* fix placeholder

* add changeset

* add changeset

* placeholder spacing fix for other themes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-04 22:25:43 +00:00
aliabid94
4a55157ed9
state.change listener with deep hash check (#8446)
* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* Update guides/04_building-with-blocks/04_dynamic-apps-with-render-decorator.md

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

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-06-04 14:19:30 -07:00
Dawood Khan
341844f04e
Click to preview images in chatbot (#8377)
* click to preview image

* add changeset

* color of svg

* notebook

* fix

* fix

* fix preview bug

* thumbnail spacing

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-03 22:30:24 +00:00
Dawood Khan
4795c6e9e9
Fix multimodal textbox styling for certain themes (#8369)
* fix css

* add changeset

* Add `--table-text-color` var to fix body text in `Examples` (#8364)

* add --table-text-color var

* add changeset

* format

* tweak

* add changeset

* fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Include JS Client package in CI for PR testing (#8362)

* add js client pkg action

* test

* Revert "test"

This reverts commit 575bcfca1b.

* tweaks (#8374)

* chore: update docs.py (#8378)

* chore: update docs.py

Documention -> Documentation

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Fix encoding error (#8381)

* Set orig_name in python client file uploads (#8371)

* Add code

* add changeset

* URL case

---------

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

* Include instructions on starting from someone else's custom component repository (#8386)

* Add guide

* add changeset

* Fix link

* add changeset

* Add code

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Fix bug in reload mode equality check. Better equality conversion for state variables (#8385)

* Add code

* Add deep equality

* add changeset

* Add code

* add changeset

* Update gradio/utils.py

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

* Add code

* Add code

* add code

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Change z-index of status tracker (#8372)

* change z-index of status tracker

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Add CDN installation to JS docs (#8401)

* add cdn copy

* add changeset

* tweak

* tweak

* add changeset

* Update guides/08_gradio-clients-and-lite/02_getting-started-with-the-js-client.md

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

* remove version from cdn link

* tweak

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Improve rendering (#8398)

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changeas

* changes

* add changeset

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* cganges

* changes

* changes

* changes

* changes

* add changeset

* changes

* chagnes

* changes

* changes

* changes

* changes

* changes

* js

* remove console log

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* chnages

* changes

* cnages

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* Add `state.change` listener (#8297)

* state changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* updates

* changes

* add changeset

* changes

* changes

* add changeset

* fix

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Render decorator documentation (#8409)

* changes

* changes

* add changeset

* fix dependency loop and documentation group

* add changeset

* changes

* fix numbered list

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>

* Connect heartbeat if state created in render. Also fix config cleanup bug #8407 (#8408)

* Add code

* add changeset

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Model3D right-handed coordinate system (#8376)

* changes (#8411)

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

* Editable Docs (#8403)

* docs intro page and guides

* python library docs and js client

* reorg

* changes

* add better hovering

* fix broken version routing

* add redirects and remove duplicate pages

* fix build issues

* fix issues

* formatting

* add changeset

* working templates for all components

* add other pages

* merge

* merge

* changes

* changes

* working from templates

* changes

* refactoring

* changes

* build working

* formatting

* importing meta globs

* add uploading templates to ci

* fixes

* add changeset

* remove fake version

* fix

* ignore

* formatting

* adding render page to docs

* add changeset

* formatting fix

* typo

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* chore: update versions (#8348)

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
Co-authored-by: Xu Song <xusong.vip@gmail.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: aliabid94 <aabid94@gmail.com>
Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Dylan Ebert <dylan@huggingface.co>
Co-authored-by: pngwn <hello@pngwn.io>
2024-06-03 12:53:59 -04:00
pngwn
e4ee5facab
chore: update versions (#8433)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-01 17:47:41 +00:00
pngwn
9909b28364
fix scrolling on spaces (#8431)
* fix param name

* format

* change

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-06-01 17:33:42 +00:00
pngwn
bc1eff12c1
chore: update versions (#8420)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-30 14:55:23 -07:00
pngwn
b67f7ff8f9
chore: update versions (#8348) 2024-05-30 00:00:00 +01:00
Ali Abdalla
5efd35c7a0
Editable Docs (#8403)
* docs intro page and guides

* python library docs and js client

* reorg

* changes

* add better hovering

* fix broken version routing

* add redirects and remove duplicate pages

* fix build issues

* fix issues

* formatting

* add changeset

* working templates for all components

* add other pages

* merge

* merge

* changes

* changes

* working from templates

* changes

* refactoring

* changes

* build working

* formatting

* importing meta globs

* add uploading templates to ci

* fixes

* add changeset

* remove fake version

* fix

* ignore

* formatting

* adding render page to docs

* add changeset

* formatting fix

* typo

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-29 18:26:54 -04:00
aliabid94
d8fe958816
changes (#8411)
Co-authored-by: Ali Abid <aliabid94@gmail.com>
2024-05-29 15:12:48 -07:00
Dylan Ebert
aebd2e952e
Model3D right-handed coordinate system (#8376) 2024-05-29 22:59:29 +01:00
aliabid94
8028c33bbc
Render decorator documentation (#8409)
* changes

* changes

* add changeset

* fix dependency loop and documentation group

* add changeset

* changes

* fix numbered list

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-05-29 14:13:51 -07:00
aliabid94
945ac837e7
Improve rendering (#8398)
* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changeas

* changes

* add changeset

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* cganges

* changes

* changes

* changes

* changes

* add changeset

* changes

* chagnes

* changes

* changes

* changes

* changes

* changes

* js

* remove console log

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* chnages

* changes

* cnages

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* Add `state.change` listener (#8297)

* state changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* updates

* changes

* add changeset

* changes

* changes

* add changeset

* fix

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-29 11:24:57 -07:00
Hannah
89d6a176b3
Change z-index of status tracker (#8372)
* change z-index of status tracker

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-29 18:12:23 +01:00
Hannah
6a1b58cf3e
Add --table-text-color var to fix body text in Examples (#8364)
* add --table-text-color var

* add changeset

* format

* tweak

* add changeset

* fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-24 00:16:44 +01:00
Xu Song
33e8babb17
Enable hiding the inline category in HighlightedText with a show_inline_category argument (#8355)
* Enable hidding inline_category in HighlightedText

* add changeset

* Update test_highlighted_text.py

* add changeset

* Update gradio/components/highlighted_text.py

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

* add story

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-05-23 09:17:41 +00:00
aliabid94
55f664f297
Add event listener support to render blocks (#8243)
* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changeas

* changes

* add changeset

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* cganges

* changes

* changes

* changes

* changes

* add changeset

* changes

* chagnes

* changes

* changes

* changes

* changes

* changes

* js

* remove console log

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* chnages

* changes

* cnages

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* Add `state.change` listener (#8297)

* state changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-22 14:51:53 -07:00
renovate[bot]
fe3e03abdc
chore(deps): update dependency iframe-resizer to v5 (#8347)
* chore(deps): update dependency iframe-resizer to v5

* 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>
2024-05-22 11:06:07 +01:00
Hannah
2d705bcf74
Add body color to gr.Accordion (#8284)
* add color to body

* add changeset

* add accordion_text_color var

* change default to body_text_color

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-21 23:52:38 +01:00
pngwn
fe91e10269
chore: update versions (#8335)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-21 21:01:35 +00:00
gtmnayan
82ba397592
add missing orig_name (follow up to #8334) (#8341)
* add missing orig_name (follow up to #8334)

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-21 20:51:54 +01:00
Freddy Boulton
4dc7fa7cd7
Fix Chatbot, Dataframe, Markdown custom components (#8339)
* Add code

* add changeset

* ts ignore

* Add code

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-21 11:11:39 -04:00
aliabid94
35905c5c8f
Cleanup markdown styling (#8311)
* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-20 15:36:23 -07:00
gtmnayan
0236b1ab12
fix: prevent triggering gr.File.select on delete (#8334)
* fix: prevent triggering gr.File.select on delete

* extract into named function

* go away eslint

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-20 13:00:22 +00:00
pngwn
32e2b64042
chore: update versions (#8320)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-17 14:30:02 -07:00
Ali Abdalla
1f9a5f0aa3
Fix bad redirect breaking website build (#8319)
* fix bad redirect

* add changeset

* second missing slash

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-17 13:44:55 -07:00
Abubakar Abid
8f46556b38
Fix api recorder (#8247)
* fix api recorder

* add changeset

* call data

* fix

* changes

* add changeset

* changes

* format frontend

* lint

* changes

* format

* add changeset

* changes

* add changeset

* fixes

* add changeset

* fix'

* format

* fixes

* add changeset

* add test

* format

* changes

* fix backend tests

* changes

* format

* fix py tests

* push

* data

* add logging

* remove console log

* fix root

* remove console

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-17 13:37:44 -07:00
pngwn
11b88915d3
chore: update versions (#8291)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-16 00:23:53 +02:00
Freddy Boulton
4350215348
Link to troubleshooting guide in the custom component loading status (#8279)
* Add code

* Add code

* add changeset

* Add code

* remove unused style

* add changeset

* Update js/app/src/Index.svelte

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

* Update guides/06_custom-components/06_frequently-asked-questions.md

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

* Update guides/06_custom-components/06_frequently-asked-questions.md

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

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-05-14 23:02:45 +00:00
pngwn
053316dd0f
chore: update versions (#8286)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-14 12:45:39 +00:00
pngwn
ca8864f514
chore: update versions (#8274)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-13 23:23:49 +00:00
Abubakar Abid
de52f0e5af
Reduce the analytics that are collected in Gradio (#8263)
* reduce analytics

* add changeset

* mark flaky

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-05-13 23:10:08 +00:00
Abubakar Abid
d708ca8fca
Reorganize Guides in a more logical order (#8262)
* guides reorg

* separate flagging

* examples

* tweak

* Update 01_quickstart.md

* redirect

* redirect

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-13 20:13:31 +00:00
Yuichiro Tachibana (Tsuchiya)
4ae17a4653
Embedded Lite example apps in the docs (#8278)
* Disable MDsveX's smartypants option to preserve the Python code embedded in the doc as Lite apps unchanged

* Add Lite embedded apps to 06_gradio-lite-and-transformers-js.md

* add changeset

* Add comments

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-13 12:08:31 -07:00
Freddy Boulton
719d5962bb
Fix bug where status tracker was the target of pointer events (#8261)
* Fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-13 12:06:32 -07:00
pngwn
fbf4edde7c
Client fixes (#8272)
* fix param name

* fix hidden state variable

* pass jwt to heartbeat event

* notebooks

* format

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-13 15:35:07 +01:00
pngwn
30463c5e15
chore: update versions (#8225)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-10 19:31:04 +01:00
Hannah
e09b4e8216
Add support for passing keyword args to data in JS client (#8197)
* allow passing kwargs to data param

* add changeset

* tweak

* update data usage in client/js readme

* more readme tweaks

* edit codesnippet

* add changeset

* check parameters exist

* add changeset

* test

* remove null check

* remove test

* use api_info

* unit tests

* type tweak

* test

* remove unused vars

* tweak

* import semiver

* tests tweak

* format code snippet

* feedback changes

* format

* typefix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-10 19:46:28 +02:00
Freddy Boulton
c562a3d9a4
Cancel server progress from the python client (#8245)
* implementation + test

* add changeset

* WIP using events

* Use /cancel route

* Try bumping lite

* add changeset

* Fix stream closing issue

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-10 12:26:39 -04:00
Dawood Khan
bf909bd145
Change upload icon for MultimodalTextbox (#8236)
* icon

* add changeset

* add changeset

* test fix

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-09 23:32:28 -04:00
Yuichiro Tachibana (Tsuchiya)
32d915aad5
Apply clean_indent() to the file contents specified with <gradio-file> tags (#8219)
* Apply clean_indent() to the file contents specified with <gradio-file> tags

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-09 12:49:24 -05:00
pngwn
22df61a26a
Client node fix (#8252)
* fix client in node

* run all client tests in ci

* add changeset

* fix types

* add changeset

* format

* types

* add changeset

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-09 12:06:28 +01:00
Freddy Boulton
6ee1f1f721
Display all custom components in the gallery (#8224)
* Add code

* add changeset

* restore pnpm lock

* Empty

* new lockfile

* pin 9.0

* Test

* Fix action

* add changeset

* Update tests-js.yml

* remove limit

* revert pnpm-lock

* add changeset

* fix template issue

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-05-07 12:58:33 -04:00
Ali Abdalla
f176e1b509
Convert all demos on docs to lite (#8220)
* use lite for demos

* styling

* formatting

* add changeset

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-06 18:57:30 -07:00
renovate[bot]
892181b4fd
chore(deps): update dependency @types/prismjs to v1.26.4 (#8226)
* chore(deps): update dependency @types/prismjs to v1.26.4

* 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>
2024-05-06 19:58:12 -04:00
aliabid94
5436031f92
Render decorator 2 (#8110)
* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changeas

* changes

* add changeset

* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* cganges

* changes

* changes

* changes

* changes

* add changeset

* changes

* chagnes

* changes

* changes

* changes

* changes

* remove console log

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-06 08:36:07 -07:00
pngwn
be2b1e1261
chore: update versions (#8172) 2024-05-03 19:06:05 +01:00
Hannah
b9afe93915
Rename eventSource_Factory and fetch_implementation (#8209)
* rename eventSource_factory -> stream_factory + rename event_source -> steam

* rename fetch_implementation -> fetch

* rename fetch to _fetch due to global.fetch conflict

* add changeset

* format

* format

* format

* format

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-03 15:24:19 +02:00
pngwn
24b2286a22
allow the canvas size to be set on the ImageEditor (#8127)
* add canvas size kwarg to imageeditor

* add changeset

* fix tests

* fix cropsize

* changes

* notebooks

* update docstrings

* fix type

* fix undefined dimensions

* Update image_editor.py

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

* fix type

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-03 10:55:19 +01:00
renovate[bot]
f5b710c919
chore(deps): update dependency eslint to v9 (#8121)
* chore(deps): update dependency eslint to v9

* update deps + fix things

* add changeset

* fix preview

* add changeset

* lockfile

* format

* add changeset

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-03 09:57:08 +01:00
Yuichiro Tachibana (Tsuchiya)
1435d1d2dc
Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (#8052)
* Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (wip: only object-detection in this commit)

* add changeset

* Add image-classification and image-segmentation

* Add zero-shot-image-classification and zero-shot-object-detection

* Add document-question-answering

* Add feature-extraction and fill-mask

* Add question-answering and summarization

* Fix an error message

* Add text2text-generation, text-classification, and text-generation

* Add translation andtranslation_xx_to_yy

* Add zero-shot-classification

* Add postprocess_takes_inputs to control the args passed to the postprocess function of each pipeline

* Add topk option to image-classification

* format_backend

* Add audio-classification, automatic-speech-recognition, and zero-shot-audio-classification

* Add image-to-text

* Add token-classification (with JSON component as an output. Is it correct?)

* Ignore import type failure of transformers_js_py

* Add image-feature-extraction

* Add image-to-image

* Add text-to-audio

* Add depth-estimation

* Remove `render=False`

* Reorder the if-blocks following the Transformers.js doc

* Update gradio/pipelines_utils.py

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

* Update gradio/pipelines_utils.py

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

* Fix feature-extraction demo

* Fix demo title

* Add guides/08_gradio-clients-and-lite/gradio-lite-and-transformers-js.md without contents

* Rename guides/08_gradio-clients-and-lite/*.md to fix the order

* Use pipeline.model.config._name_or_path for the demo title instead of pipeline.model.config.model_type

* Fix normal Interface.from_pipeline to use pipeline.model.config.name_or_path as the demo title

* Write an article about Gradio-Lite and Transformers.js

* Update the doc

* tweaks

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-05-03 07:37:51 +00:00
Yuichiro Tachibana (Tsuchiya)
376dfaaa80
Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet (#8204)
* Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet

* add changeset

* Refactoring

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-03 15:12:15 +09:00
Hannah
cf52ca6a51
Ensure connectivity to private HF spaces with SSE protocol (#8181)
* add msw setup and initialisation tests

* add changeset

* add eventsource polyfill for node and browser envs

* add changeset

* add changeset

* config tweak

* types

* update eventsource usage

* add changeset

* add walk_and_store_blobs improvements and add tests

* add changeset

* api_info tests

* add direct space URL link tests

* fix tests

* add view_api tests

* add post_message test

* tweak

* add spaces tests

* jwt and protocol tests

* add post_data tests

* test tweaks

* dynamically import eventsource

* revet eventsource imports

* add jwt param to sse requests

* add stream test

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-02 23:05:56 +02:00
Hannah
7aca673b38
Add eventsource polyfill for Node.js and browser environments (#8118)
* add msw setup and initialisation tests

* add changeset

* add eventsource polyfill for node and browser envs

* add changeset

* add changeset

* config tweak

* types

* update eventsource usage

* add changeset

* add walk_and_store_blobs improvements and add tests

* add changeset

* api_info tests

* add direct space URL link tests

* fix tests

* add view_api tests

* add post_message test

* tweak

* add spaces tests

* jwt and protocol tests

* add post_data tests

* test tweaks

* dynamically import eventsource

* revet eventsource imports

* add node test

* lockfile

* add client test in root pkg file

* lcokfile

* remove eventsource from js/app

* add changeset

* remove ts ignore

* move eventsource polyfill to eventsource factory

* add changeset

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-02 22:49:55 +02:00
Freddy Boulton
d0a759f3df
Pass Error status in /dev/reload stream (#8106)
* get error message

* Support multiple clients

* add changeset

* add changeset

* add changeset

* Display in UI

* console.error the python traceback

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-01 22:21:54 +00:00
Ali Abdalla
68dcae512c
Use workspace version for code in _website (#8189)
* workspace

* add changeset

* remove circular import from preview

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-01 14:17:56 -07:00
pngwn
6a218b4148
rework upload to be a class method + pass client into each component (#8179)
* rework upload to be a class method + pass client into each component

* add changeset

* Update client/js/src/utils/upload_files.ts

* fix storybook

* review comments

* Apply suggestions from code review

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

* format

* ts fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2024-05-01 14:55:41 +00:00
Yuichiro Tachibana (Tsuchiya)
a81e36967c
Remove hatch installation in js/app/package.json which is no longer needed (#8174)
* Remove hatch installation in js/app/package.json which is no longer needed

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-05-01 07:45:38 +09:00
Hannah
bed2f82e22
Implement JS Client tests (#8109)
* add msw setup and initialisation tests

* add changeset

* add walk_and_store_blobs improvements and add tests

* add changeset

* api_info tests

* add direct space URL link tests

* fix tests

* add view_api tests

* add post_message test

* tweak

* add spaces tests

* jwt and protocol tests

* add post_data tests

* test tweaks

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-04-30 18:50:38 +02:00
Yuichiro Tachibana (Tsuchiya)
611c9273a3
Lite wheel optimization (#7855)
* Add `pull_request.branches.main` as a trigger of the `publish` workflow

* [WIP] Comment out the publish steps

* Package and upload the NPM package for debug

* Skip the copy_frontend.py hook in the Lite build

* add changeset

* [WIP] Show gradio files

* [WIP] Show gradio files

* Comment out installing the gradio and gradio_client libraries

* Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows

* Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows

* Add code

* Revert "[WIP] Show gradio files"

This reverts commit e15fef29bd14671576e64d94d3b844786ebe7e83.

* Build the gradio wheel with the custom lite target

* add changeset

* Revert "[WIP] Show gradio files"

This reverts commit aef053f9caad203c7e1bbfa15e9f9e536f77442a.

* Revert "Skip the copy_frontend.py hook in the Lite build"

This reverts commit ca296d0e4e169adbb6af3705561869aa8c9037b7.

* Update .github/actions/install-frontend-deps/action.yml for hatch installation

* [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch

* Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch"

This reverts commit 571823b4a05f7e41e0b3731d51c5bd86b2e17ddc.

* Comment-in lines in publish.yml

* Move Lite build from publish.yml to deploy-spaces.yml

* Use the build_lite option of install-all-deps instead of running the build command

* [TMP] Change the branch of action files

* Fix the hatch Lite build setting

* Return pnpm pack to deploy-space

* Revert "[TMP] Change the branch of action files"

This reverts commit fe4e1c8f210eb21ac7ee1bd4b219d35e1ae84c85.

* Remove dependencies for lite build

* [TMP] Change the branch of action files

* Revert "Remove dependencies for lite build"

This reverts commit 856a858c1f49d736bfeb056ba0ec7e9bc35af29c.

* Install packaging>=23.2

* [TMP] Show packaging version

* Fix pip install

* Fix

* Uninstall packaging once

* Use `pip install -U` instead of uninstalling the exiting version

* Revert "[TMP] Show packaging version"

This reverts commit 910b6bbde3dc8777c051bd5576813913d57959f7.

* Add `-U` flag

* Set packaging version as >=23.2

* Revert the changes on pip install

* Set packaging version as >=23.2 in requirements.txt

* Revert "Set packaging version as >=23.2"

This reverts commit 8aa77c8930815e69d7256886cad88b6da8361069.

* Fix hook name

* Revert "Set packaging version as >=23.2 in requirements.txt"

This reverts commit fbd605cbfb5d06706eacc0648a2e9d7816c9de1f.

* Revert "Revert the changes on pip install"

This reverts commit 81ff38a660635fce9cb17862a2072e4d169c3466.

* Add comments

* Revert "[TMP] Change the branch of action files"

This reverts commit 0d6aa48d75a842db9b3987212deffedb0c0ca51d.

* Revert the trigger of .github/workflows/deploy-spaces.yml

* Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action

* [TMP] Trigger CI based on this PR

* Remove packging installation

* Revert "Remove packging installation"

This reverts commit 4a4f18de3a.

* Revert "[TMP] Trigger CI based on this PR"

This reverts commit 6cea830c8e.

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-04-30 03:18:13 +00:00