Commit Graph

1203 Commits

Author SHA1 Message Date
Abubakar Abid
8b33393586
Fix show_progress in gr.Interface (#9053)
* fix progress

* test

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-07 10:12:04 -07:00
aliabid94
360350cfc4
Minor fixes (#9021)
* 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>
2024-08-07 09:20:51 -07:00
Abubakar Abid
0978de8104
Passes gr.Request if type hint is Request | None (#9011)
* changes

* fix for python 3.8, 3.9

* fix

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-07 08:33:22 -07:00
Abubakar Abid
38b3682c3a
Improvements to FRP client download and usage (#8968)
* wip

* add changeset

* sha256

* add changeset

* hash

* tunneling

* add changeset

* validate ip address

* format

* vendor in hash func

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-07 00:55:38 +00:00
Freddy Boulton
08b5159016
Some tweaks to is_in_or_equal (#9020)
* Add code

* file_explorer test

* dont use fastapi

* Add code

* Update requirements.txt

* Ci security tweaks (#9010)

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* Ci security tweaks (#9012)

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* :[

* add cursor styling (#9003)

* Add min/max-imize button to gr.Image and gr.Gallery (#8964)

* add max/min-imize and zoom in and out to image preview

* add full screen icon to gallery

* add stories

* add changeset

* use native full screen api

* remove zoom in/out

* add changeset

* tweaks

* remove zoom prop

* fix ui test

* add annotated image btns

* add changeset

* format

* ruff format

* fix test

* remove

* tweak

* fix test

* format

* amend bool check

---------

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

* Ci security tweaks (#9014)

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* asd

* :[

* asd

* asd (#9015)

* Ci security tweaks take seventy three (#9016)

* asd

* asd

* asd

* Ci security tweaks take seventy three (#9017)

* asd

* asd

* asd

* asd

* Ci security tweaks take seventy three (#9018)

* asd

* asd

* asd

* asd

* adsa

* asd

* Ci security tweaks take seventy three (#9019)

* asd

* asd

* asd

* asd

* adsa

* asd

* asd

* Website fixes for mobile  (#8857)

* better header for mobile

* add changeset

* nicer border

* style header

* better search overlay

* responsive changes

* more mobile responsiveness

* docs and guides mobile responsive

* formatting

* fix get started button

* fix header

* test without lite

* formatting

* secondary menu docs

* fix type overflow in paramtable

* playground header

* playground on mobile

* small changes

* formatting

* formatting

---------

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

* Ci security tweaks take seventy three (#9025)

* asd

* asd

* asd

* asd

* adsa

* asd

* asd

* asd

* Ci security tweaks take seventy three (#9026)

* asd

* asd

* asd

* asd

* adsa

* asd

* asd

* asd

* fix

* asd (#9027)

* fix (#9028)

* Ci statuses (#9030)

* fix

* asd

* Update tests

* add changeset

* Add code

* add changeset

* Comments

---------

Co-authored-by: pngwn <hello@pngwn.io>
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: Ali Abdalla <ali.si3luwa@gmail.com>
2024-08-06 18:53:10 -04:00
Ali Abdalla
6584aace98
Website fixes for mobile (#8857)
* better header for mobile

* add changeset

* nicer border

* style header

* better search overlay

* responsive changes

* more mobile responsiveness

* docs and guides mobile responsive

* formatting

* fix get started button

* fix header

* test without lite

* formatting

* secondary menu docs

* fix type overflow in paramtable

* playground header

* playground on mobile

* small changes

* formatting

* formatting

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-05 21:20:24 -07:00
Hannah
bf6bbd971a
Add min/max-imize button to gr.Image and gr.Gallery (#8964)
* add max/min-imize and zoom in and out to image preview

* add full screen icon to gallery

* add stories

* add changeset

* use native full screen api

* remove zoom in/out

* add changeset

* tweaks

* remove zoom prop

* fix ui test

* add annotated image btns

* add changeset

* format

* ruff format

* fix test

* remove

* tweak

* fix test

* format

* amend bool check

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2024-08-05 23:45:14 +01:00
Freddy Boulton
4d8a473632
Refactor Chatinterface to use Chatbot instead of gr.State variables (#8847)
* add code

* add changeset

* fix

* fix multimodal case

* e2e test fix

* fix: wrong named param check for js client (#8820)

* fix: wrong named param check for js client

* rearrange type imports

* add changeset

* fix: workaround for undefined endpoint_info

---------

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: Abubakar Abid <abubakar@huggingface.co>

* trigger ci

* Add code

* Fix

* Add code

* code

* code'

* Add code

* Wait for upload

* fix tests

* trigger ci

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: JacobLinCool <jacoblincool@gmail.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-08-05 15:13:32 -04:00
Hannah
3feea64a65
Prevent overflow in Model3D (#8975)
* add overflow and radius css properties

* add changeset

* add changeset

* add changes to input

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-05 17:48:42 +01:00
pngwn
d30432e9c6
harden CI (#8965)
* test pr

* conditional

* conditional

* conditional

* conditional

* conditional

* changes

* changes

* add changeset

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-05 15:27:26 +01:00
St. HeMeow
d4c503a471
Type hint Correction (#8972)
* Type hint Correction

* add changeset

* typecheck

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2024-08-02 18:52:48 +00:00
aliabid94
2f89877ac1
Set content_disposition_type and media_type on downloaded files (#8967)
* changes

* add changeset

* changes

* add changeset

* 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-08-01 18:37:34 -07:00
Remigiusz Samborski
c68eefba6c
fix: httpx timeouts cause gradio to fail during launch (#8962)
* fix: httpx timeouts cause gradio to fail during launch

This has been fixed in https://github.com/gradio-app/gradio/pull/7707, but it seems it has been reintroduced during some other code changes/refactoring.

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-08-01 14:47:19 +00:00
Abubakar Abid
4ff91a3e65
Fixes some docstrings, particularly for the show_progress parameter (#8958)
* s

* add changeset

* fixes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-31 20:08:18 -07:00
pngwn
008d84b042
chore: update versions (#8883)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-31 13:27:38 -07:00
evanscho
f7fbd2c237
Bumped websockets version limit (#8948)
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-31 20:07:21 +00:00
Lucain
7e997a85bb
Fix running local app with fake OAuth (#8950)
* Fix running local app with fake OAuth

* add changeset

* lint

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-31 13:02:21 -07:00
Hannah
1e16f67ba2
Fix check icon in gr.JSON and gr.Code (#8949)
* fix check icon

* fix check in gr.Code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-31 12:53:12 -07:00
Hannah
5010e9579e
Add overflow: wrap to JSON to catch overflow in xs device widths (#8954)
* add overflow

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-31 12:52:11 -07:00
Hannah
600c97c807
Allow viewing JSON as list or dict with show_indices param (#8932)
* add line numbers and collapse + expand logic

* add story test and style tweaks

* add changeset

* allow expanding via preview

* story tweaks

* remove mobile/desktop story tests

* remove unused thing

* add mode param to view json as list

* add story

* add changeset

* add open param

* amend test

* * add cm-like theme colors
* prevent copy + pasting line numbers and toggle
* a11y tweaks

* remove mode as param and default to list view

* Revert "remove mode as param and default to list view"

This reverts commit 9051f15c5f.

* Update gradio/components/json_component.py

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

* add changeset

* tweak

* fix nit

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-30 23:43:22 +00:00
Abubakar Abid
5f9b8d093a
Fix lazy caching (#8933)
* fix lazy

* add changeset

* fix

* changes

* hello

* fix test

* add new test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-30 16:14:15 -07:00
aliabid94
96d36d70ad
Restore plot label angles (#8947)
* changes

* add changeset

* Update gradio/components/native_plot.py

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

* Update gradio/components/native_plot.py

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

* Update gradio/components/native_plot.py

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

* 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-30 16:00:58 -07:00
Hannah
3539787ebb
Add line numbering and collapse/expand logic to gr.JSON (#8929)
* add line numbers and collapse + expand logic

* add story test and style tweaks

* add changeset

* allow expanding via preview

* story tweaks

* remove mobile/desktop story tests

* remove unused thing

* add open param

* amend test

* * add cm-like theme colors
* prevent copy + pasting line numbers and toggle
* a11y tweaks

* update lines on rerender

* fix test

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-30 23:58:03 +01:00
Freddy Boulton
8204425bfa
Fix Json component serialization bug (#8934)
* Add code

* add code

* add changeset

* Add code

* trigger ci

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-30 15:49:14 -04:00
aliabid94
9b42ba8f10
Update guides esp plots (#8907)
* changes

* changes

* revert changes

* changes

* add changeset

* notebooks script

* 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: Ali Abdalla <ali.si3luwa@gmail.com>
2024-07-29 22:08:51 -07:00
meg
de997e67c9
Adds ability to watermark videos via a watermark parameter in Video component (#8900)
* First pass at adding watermark to Video component

* add changeset

* Update video.py

Space.

* Adding demo files

* linting

* Automatically generated notebook generator

* lint

* Changing parentheses in check on whether conversion is needed

* Unimportant comment/spacing changes

* video

* Update gradio/components/video.py

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

* Update gradio/components/video.py

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

* Update video.py

Adding more details on watermark_file.

* Update gradio/components/video.py

Change in and/or statement.

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

* Updating handling of WASM.

* Add paren.

* Minor lint change: if instead of elif

* lint change: spacing

* tweaks

* fixes

* demo

* demos

* notebooks

* notebooks

* remove comments

* video

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-29 21:09:38 +00:00
Hannah
4b14ea860d
Allow use of file extensions in gr.File in iOS (#8905)
* process file extensions in ios

* tweak

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-29 19:24:36 +01:00
Hannah
4c2d37db84
Add background to gr.Code line numbers (#8931)
* fix background colour in gr.code

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-29 19:16:38 +01:00
Andrin Benz
223688b70a
Fix Could not resolve "virtual:component-loader" in gradio/utils package (#8927)
* add catch clause to fix not being able to use newest npm package versions

* format

* add changeset

* add changeset

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-29 18:07:52 +01:00
pngwn
69f1e36f7d
fix typescript issue with custom components (#8926)
* fix ts issue with cc

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-29 17:25:36 +01:00
Dawood Khan
20444f9b56
Fix Chatbot Multimodal Examples (#8899)
* fix media

* add changeset

* fix image sizing

* fix sizes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-29 10:27:18 -04:00
Ali Abdalla
7c9fc9ebcc
Add docs for Rust client to website (#8908)
* add third party client docs

* formatting

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-26 12:58:57 -07:00
cswamy
70a0c56200
Added support for TokenClassificationPipeline (#8888)
* fix for 8628

* formatting update

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-24 13:08:15 -07:00
Abubakar Abid
f8ccb5e663
Make update_root_in_config atomic (#8867)
* root

* format

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-24 12:51:28 -07:00
Hannah
67c08bfb9e
Fix file uploading in iOS (#8879)
* use * for file/* in ios

* add changeset

* add changeset

* tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-24 16:28:21 +01:00
valgai
ac132e3cbc
Support the use of custom authentication mechanism, timeouts, and other httpx parameters in Python Client (#8862)
* gradio Client now supports the use of custom authentication mechanism with httpx

* Fix formatting issues

* Replace specific parameter `httpx_auth` by a more general parameter `httpx_kwargs`.

* add changeset

* typing

* future

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-23 21:44:00 +00:00
Ali Abdalla
7f1a78c49e
Add confirmation dialogue if leaving playground (#8871)
* add dialogue

* remove

* add changeset

* add changeset

* share button logic

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-23 21:35:44 +00:00
pngwn
70b45f4587
chore: update versions (#8777)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-22 13:28:00 -07:00
pngwn
76c1759350
add space header (#8846)
* add space header

* format

* add changeset

* test

* fix

* fix

* fixy

* fixy

* fix demons

* silly me

* format

* format + fix

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-22 19:47:14 +00:00
JacobLinCool
5050b36221
fix: wrong named param check for js client (#8820)
* fix: wrong named param check for js client

* rearrange type imports

* add changeset

* fix: workaround for undefined endpoint_info

---------

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: Abubakar Abid <abubakar@huggingface.co>
2024-07-22 19:57:22 +01:00
Dawood Khan
2f630abf53
Chatbot Examples Scroll Fix (#8865)
* fix

* add changeset

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-22 11:27:24 -07:00
Hannah
16b820038d
Fix gr.Image height inconsistencies (#8852)
* * prevent source selection cut off
* add height:100% to image-container
* ensure elements are centered

* add changeset

* add changeset

* change cover to contain

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-22 11:27:06 -07:00
aliabid94
a238af4d68
Refactor plots to drop altair and use vega.js directly (#8807)
* changes

* add changeset

* changes

* changes

* changes

* add changeset

* changes

* add changeset

* changes

* add changeset

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* add changeset

* changes

* changes

* Update gradio/components/native_plot.py

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

* Update gradio/components/native_plot.py

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

* Update gradio/blocks.py

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

* changes

* changes

* changes

* Update gradio/components/native_plot.py

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

* Update gradio/components/native_plot.py

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

* 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-07-22 09:52:48 -07:00
Hannah
914b1935de
Add copy button to gr.Markdown (#8851)
* add copy button

* add changeset

* add changeset

* lint

* value tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2024-07-22 12:39:20 +01:00
Abubakar Abid
5622331da7
Extend pyright to cover tests as well (#8856)
* add type to test

* ignore certain demos

* notebooks

* type test_video

* more typing

* more typing

* more typing

* add changeset

* more typing

* more

* more

* files

* ds

* ds

* plots

* audio
push

* annotated

* utils

* routes

* iface

* server

* restore

* external

* dep

* components

* chat interface

* fixes

* blocks

* blocks

* blocks

* blocks

* fixes

* fixes

* format

* fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-21 19:55:18 -07:00
Abubakar Abid
d1f044145a
Use covariant container types across the codebase and add typing to our demos (#8854)
* more typing

* add changeset

* tweaks

* more changes

* more fixes

* more changes

* more fixes

* more fixes

* delete

* add changeset

* notebooks

* restore

* restore

* format

* add changeset

* more typing fixes

* fixes

* change

* fixes

* fix

* format

* more fixes

* fixes

* fixes for python3.9

* demo

* fix

* fixes

* fix typo

* type

* formatting

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2024-07-19 18:34:34 -07:00
Ali Abdalla
38c2ad425a
Add website to contributing readme (#8842)
* remove empty readme

* add contributing

* add changeset

* add pnpm i

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-07-19 21:58:59 +00:00
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