Commit Graph

380 Commits

Author SHA1 Message Date
Abubakar Abid
c9b8a0c484
A few small fixes to docs / demos (#3611)
* fixes

* remove binaries

* doc

* changelog

* typing

* run on windows

* cancels

* added clarifications
2023-03-24 16:28:38 -07:00
Abubakar Abid
1c8d3cb05d
Simplify tests (#3608)
* simplify tests

* imports

* imports

* formatting

* removed cometml typing

* simplify

* changelog
2023-03-24 12:39:30 -07:00
Dawood Khan
811d26aab4
Use gradio-api-server for telemetry (#3488)
* analytics

* changelog

* remove interface analytics

* ip

* remove import

* format

* theme name

* theme analytics

* format

* changelog

* fixes

* format

* remove unused param

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-24 13:01:31 -04:00
Abubakar Abid
7a4e22b61a
Fixes Blocks exit issue (#3600)
* fix

* changelog

* blocks

* formatting
2023-03-24 09:48:32 -07:00
Freddy Boulton
9d3f58b898
Translate "or" for i18n (#3599)
* Translate or for i18n

* CHANGELOG
2023-03-24 11:02:05 -04:00
Freddy Boulton
f2fb69ec29
Trigger event when Slider number input is released (#3589)
* Add event

* Add unit test

* CHANGELOG
2023-03-23 17:59:56 -04:00
Freddy Boulton
926f3e21bf
Set theme name from load (#3595)
* Add name + test

* Add theme names

* CHANGELOG

* Delete theme in interface
2023-03-23 17:27:16 -04:00
Freddy Boulton
7140903dd6
Fix darkmode text color for altair plots (#3555)
* dont apply formatting for non-native plots

* CHANGELOG

* Remove unused diff
2023-03-21 19:32:33 -04:00
Ali Abdalla
053504a691
Remove extra $demo from theme guide (#3563)
* remove extra

* changelog
2023-03-21 12:53:47 -07:00
Ali Abdalla
ab95f0551e
Mobile responsive iframes in themes guide (#3562)
* make demos mobile responsive

* changelog
2023-03-21 11:52:34 -07:00
Abubakar Abid
6c8aeed58f
Theme guide fixes (#3561)
* fixes

* changelog

* changelog

* changelog

* fix
2023-03-21 10:44:25 -07:00
Abubakar Abid
88afd684be
Makes some fixes related to TempFiles (#3523)
* temp file fixes

* changes

* fixing tests

* formatting

* fix

* fix chatbot processing

* tests

* get tests to pass

* fix code demo

* changelog

* fix multimodal
2023-03-21 09:37:24 -07:00
Abubakar Abid
dbd4f755fe
Fixes theme guide & releases gradio==3.23.0 (#3554)
* some updates to the guide theme

* version release

* changelog

* changelog

* update guides to use interface

* changes

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-03-20 23:20:09 -07:00
aliabid94
ea54486350
Dropdown issues (#3549)
* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-20 22:57:49 -07:00
Abubakar Abid
c1b5d42cd2
Removes leading spaces from all lines of code uniformly in the gr.Code() component (#3556)
* code changes

* changelog
2023-03-20 22:07:46 -07:00
aliabid94
ce20f1ba20
fix login (#3529)
* fixes

* changes

* changes
2023-03-20 21:59:19 -07:00
Freddy Boulton
8ec2b0b98a
Sharing themes (#3428)
* Rebase

* Remove build hooks

* Working implementation

* Add semver + unit tests

* CHANGELOG

* Add to docs

* Rename push_to_hub and fix typos

* Fix gallery

* Fix typo

* Address comments + tests

* Update gradio/themes/app.py

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

* Import Base as Theme. Use DefaultTheme() as fallback

* Fix types

* Make version and token truly optional

* Add version dropdown + tests

* trigger

* Support private themes and org_names

* Fix org_name typo

* Update wheel

* Fix font loading and dumping

* fixing tests

* fix tests

* formatting

* version

* remove requirements

* remove requirements

* formatting

* fix tests

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-18 20:15:02 -07:00
github-actions[bot]
27be008d58
New Version Docs (#3509)
* [create-pull-request] automated change

* trigger rerelease

---------

Co-authored-by: abidlabs <abidlabs@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-18 17:54:22 -07:00
Abubakar Abid
6c2279d52f
version 3.22.1 (#3508) 2023-03-18 17:41:12 -07:00
aliabid94
a56b7de3c6
Theme label bar fix (#3507)
* changes

* changes

* changes

* changes

* changes

* Update gradio/themes/base.py

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

* Update gradio/themes/base.py

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* changes

* changes

* changes

* changes

* changes

* undo merge break

* changes

* changes

* changes

* fix

* theme_to_soft

* changes

* restore_label_stat_bats

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-18 17:30:52 -07:00
github-actions[bot]
8e59eb9f06
New Version Docs (#3505)
* [create-pull-request] automated change

* trigger refresh

---------

Co-authored-by: aliabd <aliabd@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-18 13:55:31 -07:00
Abubakar Abid
5249bdd753
Release v3.22.0 (#3489)
* release 3.22.0

* Add type hint

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-03-18 13:24:11 -07:00
space-nuko
52253b8bb1
Remove IOComponent.add_interactive_to_config (#3476)
* Remove `IOComponent.add_interactive_to_config`

* Move interactive mode conversion into postprocess

* Requested changes

* Update tests

* Fix test

* Fix test

* Fix test

* Fix test

* updating test file

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-18 08:13:19 -07:00
Abubakar Abid
df7dffca88
Rename theme guide (#3500)
* rename guie

* rename guide

* update link in changelog
2023-03-17 18:05:04 -07:00
aliabid94
5089fff3a6
More theme updates (#3497)
* changes

* changes

* changes

* changes

* changes

* Update gradio/themes/base.py

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

* Update gradio/themes/base.py

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* changes

* changes

* changes

* changes

* changes

* undo merge break

* changes

* changes

* changes

* fix

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-17 17:20:55 -07:00
Abubakar Abid
de3254fd08
Theme+release (#3494)
* changes

* changes

* changes

* changes

* changes

* Update gradio/themes/base.py

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

* Update gradio/themes/base.py

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* Update guides/03_building-with-blocks/06_theming-guide

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

* changes

* changes

* changes

* save file

* update changelog

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-03-17 07:41:53 -07:00
Freddy Boulton
79a369cc68
Fix loading css and api when mounted in subpath (#3482)
* Implementation

* Lint + CHANGELOG

* Remove log + / typo

* Fix embedding

* Minor fix

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-16 17:33:40 -04:00
space-nuko
6ffa7f105e
Remove generate_sample() method (#3483)
* Remove `generate_sample()` method

* Add changelog entry

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-16 14:22:25 -07:00
Abubakar Abid
eb101c428f
Adds copy button to textbox via .style() (#3452)
* add copy to textbox

* changelog

* formatting, docstring

* changes

* formatting

* demo

* cleanup

* copy button
2023-03-15 16:45:45 -07:00
aliabid94
373c8dd716
Add elem classes (#3466)
* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-15 14:01:53 -07:00
Abubakar Abid
3d0ab76532
Pin pyright (#3475)
* changelog

* changelog

* changelog
2023-03-15 09:53:48 -07:00
Abubakar Abid
318e90c0ed
Fix File.upload() event (#3462)
* fix .upload event

* changelog

* cleanup
2023-03-15 07:22:34 -07:00
aliabid94
814e928f05
Fix primary bg button color (#3468)
* changes

* changes
2023-03-14 21:12:00 -07:00
Ali Abdalla
302982c71e
Document gr.Error (#3465)
* add docstrings and document error

* fix link in guide

* changelog

* lint
2023-03-14 20:00:26 -07:00
Radamés Ajna
226e87cd54
implement missing methods handle nested dict (#3459)
* implement missing methods handle nested dict

test for get 'user-agent'
extra example for gr.Requests

* missing notebook example

* add missing attributes, keys, values, items

* update changelog

* fix changelog
2023-03-14 15:15:12 -07:00
github-actions[bot]
d2a0bd02f5
New Version Docs (#3457)
* [create-pull-request] automated change

* trigger

---------

Co-authored-by: abidlabs <abidlabs@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-13 18:29:42 -07:00
Abubakar Abid
82b481a7c7
V3.21.0 (#3455)
* version 3.21

* version
2023-03-13 18:08:49 -07:00
aliabid94
3d772b6aea
Fix Mic display (#3456)
* changes

* fix
2023-03-13 18:02:53 -07:00
aliabid94
95bf08b2e2
Adding the .select event listener (#3399)
* changes

* changes

* changes

* changes

* changes

* changes

* changs

* changes

* changes

* changes

* changes

* changes

* changes

* preview

* fix notebook

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* Add type hints (#3403)

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

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* change

* changes

* changes

* changes

* changes

* changes

* changes

* Update gradio/helpers.py

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

* doc update

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-03-13 17:12:41 -07:00
Abubakar Abid
c4734fff8b
Makes a few fixes to the JSON component (#3451)
* small fixes

* changelog, formatting

* static checks
2023-03-13 10:29:26 -07:00
Dawood Khan
f8159aa5f4
Making the chatbot even more multimodal (#3413)
* multimodal chatbot

* notebook

* fix tests

* Update demo/chatbot_multimodal/run.py

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

* fix notebook

* changelog

* Update CHANGELOG.md

* Update gradio/components.py

* Update gradio/components.py

* Update gradio/components.py

* fixing security issue

* updating demo

* formatting

* demo notebooks

* changes

* typing

* changes

* changes

* changes

* add test

* fixes

* renaming demos

* fixed demo

* fixes

* fix demos

* chatbot

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-03-13 07:21:03 -07:00
aliabid94
092b7448e6
consecutive triggers with .then (#3430)
* changes

* changes

* changes

* changes

* changes

* changes

* changes

* Update guides/03_building-with-blocks/01_blocks-and-event-listeners.md

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

* Update gradio/blocks.py

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

* Update demo/chatbot_simple_demo/run.py

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

* Update demo/chatbot_simple_demo/run.py

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

* allow nest

* changes

* changes

* changes

* changes

* changes

* events

* formatting

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-11 20:38:22 -08:00
pngwn
11bb732f5d
add code component (#3421)
* add code component

* changes

* changes

* code

* add code to all_demos

* change remove prefix

* changes

* notebooks

* fix pythong types

* changelog

* cleanup

* Apply suggestions from code review

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

* add interactive kwarg

* fix focus

* changelog

* fix demo

* tests

* cleanup

* Update gradio/components.py

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

* change padding to compute from block label styles

* use neutral colours for sucess animation

* cleanup

* update document

* add changelog for fix

* fix documentation

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-10 17:52:17 +00:00
Freddy Boulton
97488412ec
Fix event handler documentation (#3434)
* Document callable method

* Add comment

* CHANGELOG
2023-03-10 12:36:08 -05:00
aliabid94
c22f84343b
Event listener cleanup (#3420)
* changes

* changes

* trim out then

* chagnes

* CHANGES

* changes

* changes

* changes

* restore ui

* changes

* changes

* changes

* changes

* changes

* changes

* Update gradio/documentation.py

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

* changres

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-09 12:58:41 -08:00
Ali Abdalla
19f9f06d54
Document Blocks methods (#3427)
* document launch, queue and integrate in blocks

* seperate example usages for interface vs blocks methods

* changelog

* fix lint

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-09 12:10:17 -08:00
Ikko Eltociear Ashimine
92e576f8eb
Fix link (#3417)
* Fix link

* changelog

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-09 08:29:50 -08:00
Freddy Boulton
909b94f452
Fix BlockContext import bug in utils.py (#3424)
* Fix import bug

* CHANGELOG
2023-03-09 10:59:10 -05:00
Dawood Khan
12fb005ac8
Analytics Refactor (#3342)
* hub telemetry

* more analytics

* format

* changelog

* Gradio Status Page  (#3331)

* add status page to error message

* changelog

* link to status page on website

* move link to the right

* merge

* merge

* Add option to display gallery in preview mode (#3345)

* Add code + api

* CHANGELOG

* dropdown (#3338)

* fix

* fixes

* format

* changelog

* Update gradio/components.py

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

* fix clear case

---------

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

* Some improvements to Flag (#3289)

* Fixes to button disable

* button

* formatting

* flagging fix

* fixes

* formatter

* changelog

* ormatting

* tests

* saving

* adding optionality for flagging

* updatest

* error catching

* updates

* changelog

* tests

* typing

* flag button

* formatting

* tests

* tests

* tests

* increased latency

* queue fix

* clear

* formatting

* fix

* fix tests

* Fix flaky external test (#3348)

* Fix flaky external test

* CHANGELOG

* Undo accidental diff

* Fix flaky external test

* CHANGELOG

* Undo accidental diff

* Remove from changelog

* Use bunny file

---------

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

* updates

* format

* more updates

* threading

* fixes

* Fix error when using backen_fn and custom js at the same time (#3358)

* Fix error when using backen_fn and custom js at the same time

* generate notebooks

* update changelog

* changes

---------

Co-authored-by: Ali Abid <aabid94@gmail.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>

* Fix File updating (#3375)

* Fix

* Remove line

* Add unit test

* CHANGELOG

* Remove comment

* Updated chat ui (#3370)

* test

* changes

* chagnes

* changes

* changes

* changes

* changes

* Update CHANGELOG.md

* changes

* Update demo/chatbot_multimodal/run.py

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

* Update demo/chatbot_simple_demo/run.py

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

* changes

* changes

* changes

---------

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

* fixes

* New Version Docs (#3376)

* [create-pull-request] automated change

* empty commit

* [create-pull-request] automated change

* empty commit

---------

Co-authored-by: abidlabs <abidlabs@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>

* requirements

* test requirements

* Release 3.20.1 (#3390)

* release 3.20.1

* changelog

* merge

* New Version Docs (#3392)

* [create-pull-request] automated change

* trigger ci

---------

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

* merge

* Remove everything related to encryption (#3396)

* remove requirements

* deprecate encrypt

* remove flagging

* deprecate

* formatting

* lint

* Adds a Chinese translation for the `README` (#3394)

* add chinese readme

* add chinese readme

* update changelog

* fix render_readme and english readme

* generate readme

* remove template and quickstart files

* link to chinese from english

* fix assets paths

* link to english from chinese

* change file location

* fix link

* fix link

* fix link

---------

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

* fix bad codeblock (#3401)

* Always set queue=False if every is None for load events (#3391)

* Always set queue=False if every is None

* CHANGELOG + linting

* Move to latest release section

* changelog

---------

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

* JS client take 2 (#3388)

* start

* change api

* integrate into gradio

* log

* try this

* format

* changes

* format

* fix css

* fix file

* fix #3282 avoid in-place dict updates (#3405)

* fix #3282 avoid in-place dict updates

* add tests and changelog for PR3405

* Fix markdown embedded component in docs (#3410)

* revert to old md component demo

* changelog

* Added a section on security (#3408)

* security

* added section on security

* security

* changes from review

* Fix local tests (#3411)

* document embed params

* fix tests

* cleanup

* cleanup

* cleanup

* revert

* changelog

* Document web component parameters (#3407)

* document embed params

* changelog

* iframe

* fixed review changes

* requirements

* fixes

* format

* format

* requirements

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Jialei <3217223+jialeicui@users.noreply.github.com>
Co-authored-by: Ali Abid <aabid94@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: abidlabs <abidlabs@users.noreply.github.com>
Co-authored-by: Uanu <92366232+uanu2002@users.noreply.github.com>
Co-authored-by: gitgithan <hanqi11991@hotmail.com>
2023-03-08 21:28:15 -05:00
Ali Abdalla
f86b6445f8
Fix css issue with spaces logo (#3422)
* override css

* changelog
2023-03-08 15:37:56 -08:00