Commit Graph

7134 Commits

Author SHA1 Message Date
Hannah
9ee6839f94
Change optionality of the data param in submit + predict (#8816)
* add initialiser to data

* tweak submit

* add changeset

* type fixes

* ruff lint

* fix test

* Revert "fix test"

This reverts commit 5d01b5c95b.

* Revert "ruff lint"

This reverts commit 2c8e518a75.

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-19 15:47:31 +01:00
Abubakar Abid
0d76169e46
upgrade pyright==1.1.372 (#8837)
* upgrade typing

* more fixes

* add stubs folder

* add changeset

* fix docstring

* docstring

* type

* fix tests

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-19 00:21:51 -07:00
Abubakar Abid
7e8c829aad
Add .input() events to gr.Audio and gr.Image (#8836)
* add input

* format

* add changeset

* add changeset

* add audio browser tests

* add browser tests

* notebooks

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-18 23:17:13 -07:00
Dawood Khan
3a81fb2578
Latex Rendering Fix (#8822)
* latex

* add changeset

* delimiters fix

* change

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-18 21:15:43 -04:00
pngwn
e75f2ca2da
Fix build for pre-release (#8832)
* Update vite.config.ts

* add changeset

* fix thing

* Fix website pre (#8833)

* fix website

* fix website pre

* cleanup condition

* cleanup condition again

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-18 11:25:50 +00:00
pngwn
356e961a17
fix (#8830) 2024-07-18 10:56:03 +01:00
Ali Abdalla
b45d37f366
Fix param table rendering (#8825)
* fix

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-17 23:36:59 -07:00
Yuichiro Tachibana (Tsuchiya)
61bb5883a2
Remove Pydantic v2 patch from Lite (#8799)
* Remove Pydantic v2 patch as it's now natively provided by Pyodide>=0.26.1 (ref: https://github.com/pyodide/pyodide/pull/4500)

* add changeset

* add changeset

* Fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-18 10:39:40 +09:00
Michael
2cc813a287
Fix OS detection for cross-browser compatibility (#8784)
* chore: add .python-version to .gitignore

* fix(get_os): ensure compatibility across all browsers

* format

* chore: add ts ignore comment again

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2024-07-17 15:51:36 -07:00
Hannah
6073736651
Document FileData class in docs (#8757)
* expose class + add docs

* add filedata section

* add changeset

* * add example usage
* expose FileData in Python client

* add changeset

* format

* tweaks

* tweaks

* fix test

* lint

* ruff lint

* lint again

* revert test

* remove desc from schema

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-17 12:23:19 -07:00
Yuichiro Tachibana (Tsuchiya)
e36bab77e5
Refactoring loadPyodide typing (#8775)
* Refactoring loadPyodide typing

* add changeset

* Fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-17 12:18:47 -07:00
Yuichiro Tachibana (Tsuchiya)
2de9a97ae9
Refactoring <gradio-lite /> component making the code simpler and fixing a Playground mode bug (#8693) (#8818)
* 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-17 12:17:11 -07:00
Ali Abdalla
7b049e0357
Fix DateTime docs (#8823)
* fix

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-17 19:15:45 +00:00
Ali Abdalla
cea3bf9900
Fix dependency loop with statustracker and markdown (#8821)
* fix loop

* add changeset

* add changeset

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-17 18:55:45 +00:00
pngwn
e1a404093c
Ensure all upload components have consistent upload regions. (#8803) 2024-07-17 17:37:25 +01:00
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
7f41567e9c
Use constant-time comparison when checking user provided analytics key (#8809)
* constant-time comparison when comparing hashes

* add changeset

* add changeset

* use route utils

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-17 12:21:29 +00: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
Abubakar Abid
b0aa87c782
Update trigger-checks.yml (#8798) 2024-07-15 20:00:35 -07: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
Yuichiro Tachibana (Tsuchiya)
2d179f647b
Set the default format of gr.Plot as png for Wasm mode (#8774)
* Set the default format of gr.Plot as png for Wasm mode

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-14 18:33:03 +09:00
Ali Abdalla
13f4cf899f
fixed (#8770) 2024-07-12 23:56:25 +00: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
1e8f31b09a
fix (#8764) 2024-07-12 18:21:47 +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
Abubakar Abid
ee497d5c3c
Perform CORS validation when the request has a cookie (#8743)
* Perform CORS validation when the request has a cookie

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-11 06:57:48 -07: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
pngwn
a6b3c6ce4e
Ensure @gradio/client's submit iterator releases as expected (#8715)
* close the iterator when the prediction stream completes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-11 12:01:08 +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
d15ada9a1c
Fix multimodal textbox custom components (#8719)
* Add code

* add changeset

* Add code

* Update comment

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-10 13:09:08 +02:00