Commit Graph

234 Commits

Author SHA1 Message Date
Freddy Boulton
5c32ba31ba
Fix reload mode (#2992)
* Fix reload mode

* Add unit test

* Add to changelog
2023-01-16 12:17:41 -05:00
Abubakar Abid
b1b6841b7e
version (#2988) 2023-01-15 21:58:20 -08:00
Dawood Khan
537fa11b78
Fixes file upload fails for files with zero size (#2923)
* fix file zero size erroe

* changelog

* fixes

* add a test

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-15 20:38:28 -08:00
aliabid94
34cf1e612b
Support media output, "/file=" endpoint on iOS (#2961)
* changes

* changes

* change

* changes

* changes

* change

* changes

* change

* changes

* changes

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-15 19:54:09 -08:00
Freddy Boulton
3f2074855d
Fix bug downloading files with long names (#2929)
* Fix bug

* Add changelog

* move to current release section

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-15 18:58:14 -08:00
Freddy Boulton
06b973bda4
Fix Loading Examples (#2955)
* Fix

* CHANGELOG

* Unit test

* Fix

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-15 18:51:05 -08:00
Alina Rogalska
2e54471610
Fix cached examples encoding (#2974)
* Fix encoding when loading cached examples

* Format backend

* Add changes to CHANGELOG

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-15 00:16:46 -08:00
Tasha Upchurch
94c9512df9
the original demo would fail after switching to the 3rd tab once, by … (#2971)
* the original demo would fail after switching to the 3rd tab once, by not returning to it again when directed to.

it appears that somewhere in tabs, that selected is not being updated when a tabitem is selected.

* Changelog + notebooks:

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-01-13 13:41:53 -05:00
Abubakar Abid
6a3c8d3fdf
Bring back change event for Dropdown (#2954)
* bring back change

* changelog

* changelog

* changelog
2023-01-08 13:09:40 +01:00
Anton Lozhkov
981cd1ea68
Fix the path check for long CSS strings in Blocks (#2953)
* Fix the path check for long CSS strings in Blocks

* Add a test

* Update changelog
2023-01-08 06:31:21 -05:00
Freddy Boulton
1dcacdb6c9
Fix bug in mount_gradio_app with queue enabled (#2939)
* Move to __exit__

* Add test

* Add unit test

* Add changelog

* fix test

* Fix test

* Fix Release notes
2023-01-08 05:42:57 -05:00
aliabid94
13fd9f35e1
Hotfix audio output, HighlightedText skip (#2950)
* changes

* fixes

* changes
2023-01-07 22:26:19 -06:00
Freddy Boulton
b3dc6f5574
Fix changelog typo (#2938) 2023-01-05 12:37:17 -05:00
Ali Abdalla
1ae01b2005
Optimize images and gifs (#2922)
* convert gifs to html video

* optimize images

* changelog
2023-01-05 16:49:53 +02:00
aliabid94
325ba0df2b
changes (#2933) 2023-01-04 21:39:58 -06:00
Dawood Khan
9fff1e0fe8
Enable multi-select on gradio.Dropdown (#2871)
* multiselect dropdown

* fixes

* more fixes

* changes

* changelog

* formatting

* format notebooks

* type fixes

* notebok fix

* remove console log

* notebook fix

* type fix

* Revert "format notebooks"

This reverts commit fb8762ecff.

* notebook fix

* bug fixes

* Update CHANGELOG.md

* Excluding untracked files from demo notebook check action (#2897)

* excluding untracked files from wget

* changelog

* fix setting default values

* typeability and arrow key support

* python types

* reformat

* another type check

* minor fixes + interactive false fix

* change remove token styling

* separate multiselect into separate file

* style fixes

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* some more style fixes

* small bug fix

* addressed pr comments

* fix active color highlighting

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-04 19:13:46 -05:00
Dawood Khan
ad42e80dca
Upload filetypes of specified extensions (#2901)
* file extensions

* Update CHANGELOG.md

* update notebook

* formatting

* notebook fix

* fixes
2023-01-04 12:34:46 -05:00
Freddy Boulton
92797fd486
Fix File Downloading (#2926)
* Fix + test

* Changelog
2023-01-04 12:18:04 -05:00
Freddy Boulton
f0727b9192
Deploy PRs from forks to spaces (#2895)
* store secrets in other repo

* Fix typo

* Use separate job

* trigger

* trigger

* trigger

* trigger

* Set up dependency

* Rename

* Close quotes

* empty

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* empty trigger

* Add files

* CHANGELOG + rename workflow

* Remove echo and use repository owner

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-03 14:24:01 -05:00
Pradyumna Rahul
6a6e9175e1
Updating typing in utils.py and templates.py (#2904)
* typing

* typing

* typing

* updated CHANGELOG.md

* typing

* typing

* typing

* typing

* Update max_args count to be -1 if positional param type

max_args would be set to the value of "infinity" when the param was of VAR_POSITIONAL type. That makes max_args hold both int and string values.
Updated the max_args to be set to -1 value.

* Updated to use same response and not previous response for validation

* Keep self._response uninitialized

* Updated to use empty BaseModel when not validation_model not present

* Reference `BlockContext` directly

* initializing end as 0 in format_net_list

* Updating docs for error_analytics

* Update file version check in utils

* Update gradio.strings import

* typing

* typing

* typing

* typing

* typing

* typing

* typing

* typing

* typing

* typing

* Add utils.py and templates.py to type check script

* fixed changelog

* Update formatting of utils.py

* rerun ci

* flagging fix

* fix typing

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-01-03 12:20:02 -05:00
Ali Abdalla
d77b0702d1
Add a components - events matrix on the docs (#2921)
* add components events matrix

* changelog
2023-01-03 17:45:09 +02:00
aliabid94
58b1a074ba
Add Progress Bar component (#2750)
* changes

* version

* changes

* fixes

* changes

* changes

* changes

* changes

* chagnes

* chagnes

* fix

* changes

* changes

* changes

* change

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* version update

* Commit from GitHub Actions (Upload Python Package)

* changes

* changes

* changes

* fix

* changes

* changes

* changes

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* changes

* changes

* changes

* changes

* change

* changes

* Update guides/01_getting_started/02_key_features.md

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

* Update gradio/helpers.py

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

* Update gradio/routes.py

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

* Update gradio/helpers.py

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

* Update guides/01_getting_started/02_key_features.md

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

* Update guides/01_getting_started/02_key_features.md

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

* Update demo/progress_simple/run.py

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

* Update demo/progress_simple/run.py

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

* Update demo/progress_simple/run.py

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

* Update website/homepage/src/docs/template.html

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

* Update website/homepage/src/docs/template.html

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

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* change

* changes

* changes

* changes

* change

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: GH ACTIONS <aliabid94@users.noreply.github.com>
2022-12-30 11:45:54 -08:00
Felix Dombek
5c108458aa
Fix "audio used before assigned" bug (#2898)
* Fix "audio used before assigned" bug

audio_from_file did not correctly handle the case where the file cannot be opened. This PR fixes e.g. the crash mentioned in [TheAlly's Riffusion tutorial](https://theally.notion.site/theally/Quick-n-Dirty-Riffusion-txt2audio-Tutorial-18e57df9ef214c3280efc5998bbf774d).

* Update CHANGELOG.md

* Output helpful message about ffprobe

* Output error message

* Raise chained RuntimeError with full description

* Fix indentation

* Fixed spacing

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-12-29 09:06:18 -05:00
Ali Abdalla
d934828a7c
Excluding untracked files from demo notebook check action (#2897)
* excluding untracked files from wget

* changelog
2022-12-28 16:40:03 +04:00
Abubakar Abid
de0c41c1c4
Enforcing typing in blocks.py and context.py (#2887)
* started pathlib

* blocks.py

* more changes

* fixes

* typing

* formatting

* typing

* renaming files

* changelog

* script

* changelog

* lint

* routes

* renamed

* state

* formatting

* state

* type check script

* remove strictness

* switched to pyright

* switched to pyright

* fixed flaky tests

* fixed test xray

* fixed load test

* fixed blocks tests

* formatting

* fixed components test

* uncomment tests

* fixed interpretation tests

* formatting

* last tests hopefully

* argh lint

* component

* fixed based on review

* refactor
2022-12-27 16:54:47 -05:00
Freddy Boulton
e7cca92831
Fix blocks_style demo (#2890)
* Fix blocks_style demo

* Add changelog

* Fix API + notebook

* Remove nested column

* moved highlighttext colormap to style

* Add back container

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-27 11:51:08 -05:00
Freddy Boulton
6b77ea07d3
Fix bug displaying dataframe examples in csv/tsv files (#2877)
* Use loaded value for dataframe preview

* Add to CHANGELOG

* Changelog
2022-12-27 10:48:32 -05:00
Jay Smith
571e5eb66c
Correct message when is_generating hits 500 code (#2889) 2022-12-27 10:31:27 -05:00
Mohamed Rashad
21820f47ab
Add title to TabbedInterface (#2888)
* Add title to `TabbedInterface`

* Add title to the header of interface

* Add the new title feature to changelog
2022-12-26 19:52:33 -05:00
Jean Ribeiro
24f413c4b3
enhancement: record audio and video from webcam simultaneously (#2721)
* Recording Audio and Video from webcam simultaneously

* Add include_audio option in Video component

* Update gradio/components.py

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

* Update CHANGELOG.md

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

* updated include_audio default behavior

Co-authored-by: Mandar Gogate <9411881+MandarGogate@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>
2022-12-26 13:56:17 -05:00
Abubakar Abid
066adf1a9d
Google Sheets + LinePlot Guide (#2816)
* draft

* guide

* add guide

* changelog

* changelog

* addressed comments
2022-12-23 10:40:52 -06:00
Freddy Boulton
1765cf68ae
Make it so that default_enabled has no impact on queue behavior (#2876)
* Deprecate default_enabled + test

* CHANGELOG

* Remove docstring for deprecated param

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-21 16:11:20 -05:00
Abubakar Abid
474b88af52
Removes the share warning msg and upgrades to gradio==3.15.0 (#2870)
* removed share msg

* update version

* Add next section to changelog

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2022-12-21 11:33:28 -05:00
Ali Abdalla
9893166830
Fix css glitch and navigation in docs (#2856)
* fix css and navigation

* update changelog

* format backend

* fix css glitch in 3.14 docs

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-21 19:11:18 +04:00
Ali Abdalla
dc200af89c
Remove footers and min-height the correct way (#2860)
* fixes to readme

* add css to demos and remove footer js from html

* update changelog

* fix weird notebook

* fix weird notebook

* fix weird notebook

* fix weird notebook...

* actually fixed the problem
2022-12-21 19:01:42 +04:00
Freddy Boulton
943b4ed77a
Wrap value in list for CheckBoxGroup. (#2866)
* Value error

* Add test

* Wrap value

* CHANGELOG

* Re-enable Example pagination on the front-end (#2861)

* Pass samples_per_page to examples

* Add to changelog

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

* Value error

* Add test

* Wrap value

* CHANGELOG

* Update docstrings

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-20 18:02:18 -05:00
Freddy Boulton
ed2781d8d7
Re-enable Example pagination on the front-end (#2861)
* Pass samples_per_page to examples

* Add to changelog

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-20 17:10:23 -05:00
Abubakar Abid
612ab0539e
Fixed loading Spaces that have components with default values (#2855)
* fixed load space default values

* changelog

* formatting

* tweak

* fix tests
2022-12-20 15:38:02 -06:00
Abubakar Abid
0879f0a296
Fixes flagging when allow_flagging is set to "auto" (#2695)
* flagging fix

* formatting

* changelog

* auto

* auto
2022-12-20 15:27:14 -06:00
Freddy Boulton
96297c0bad
LinePlot (#2807)
* First draft

* Fix tests

* Fix pdb

* Figure out stroke dash + legend position

* Add legend position

* Add back gif

* Add demo + update demo

* Format notebooks

* Changelog

* More changelog

* Undo notebooks

* Reword

* Set lower bound for altair

* Modify docstrings

* Add LinePlot image to changelog
2022-12-20 11:13:51 -05:00
Billy Cao
8f9d9ce25c
Add workaround to prevent importing gradio breaking PIL.Image.registered_extensions() (#2846)
* Add workaround to prevent importing gradio breaking PIL supported extensions list

* Update CHANGELOG.md

* Move _Image.init() to after all imports
2022-12-19 21:11:16 -06:00
Ali Abdalla
3cb2bb061c
Fix formatting issues in Big Query guide and Changelog (#2842)
* fix formatting issues

* fix format issues with guide and changelog
2022-12-17 15:51:35 -06:00
Abubakar Abid
62fdaf7c38
BigQuery Guide (#2794)
* bigquery draft

* updated guide

* updates

* changelog

* changelog

* title change

* renamed and added seo tips

* renamed

* added gif
2022-12-16 16:15:55 -06:00
Abubakar Abid
369f7d294e
Release 3.14.0 (#2834)
* 3.14.0

* changelog
2022-12-15 16:51:31 -06:00
Abubakar Abid
4e7317036d
Adds an every parameter to every component (#2806)
* bigquery draft

* updated guide

* orjson fix

* formatting

* changelog

* attach every

* removed queue=False

* added test

* formatting

* adding event

* wip

* fix implementation

* remove prints

* formatting

* lint

* formatting

* reset guide

* changelog

* fix tests

* added test

* changelog

* renamed

* renamed

* lint
2022-12-15 16:07:44 -06:00
Abubakar Abid
20057aa946
Create fewer temp files and make them consistently-named (#2758)
* tmp files

* components

* changes

* temp_file_sets

* TempFileManager class

* added file manager

* internal functions

* tests

* formatting

* changes

* video tests

* added tests for File

* cheetah image

* formatting

* tests for upload button

* temp files

* formatting

* changelog

* fixed audio

* tmp files

* tmp files

* gallery

* deprecated type=file

* fixing tests

* patch os.path.exists

* fixed test_video_postprocess_converts_to_playable_format

* fixed tests

* changelog

* fix tests

* formatting

* added a download_if_needed

* formatting

* fixed download

* fixed gallery demo

* fix tests

* version

* fix for mac

* consolidate
2022-12-15 14:37:09 -06:00
Dawood Khan
714ab2cc09
Audio waveform (#2706)
* utils func

* changes

* changes

* changes

* notebook

* fix

* changes

* change

* changes

* changes

* notebook fix

* changes

* changes

* changes

* change

* fix

* revert backend changes,  gr.make_waveform

* notebook

* Update CHANGELOG.md

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

* format fix

* changes

* changes

* revert pnpm

* change

* change

* changes

* changes

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-15 12:35:22 -06:00
Abubakar Abid
074bf909ee
Better documentation of queuing parameters (#2825)
* better documentation of queuing parameters

* changelog

* added to guide

* deprecated param

* python 3.7 compat
2022-12-15 10:41:09 -06:00
Freddy Boulton
cce636251c
Format 3.13.2 release notes (#2830) 2022-12-15 11:08:18 -05:00
Erik Cederstrand
c67af90663
Remove h11 pinning (#2820)
* Remove h11 pinning

No longer relevant after release of httpx==0.23.1. See https://github.com/gradio-app/gradio/pull/1680

Refs https://github.com/gradio-app/gradio/pull/1680

* Add entry in CHANGELOG
2022-12-15 08:17:55 -06:00
Abubakar Abid
a83e10d7bd
Release 3.13.1 (#2817)
* changelog

* version

* changelog
2022-12-14 19:09:50 -06:00
Emily Uhde
ade918d0a2
2777 Add restProps to IconButton … (#2791)
* 2777 Add restProps to IconButton and use it to pass aria-labels down to the button element where it's used in other UI components

* 2777 Update per PR feedback, explicitly pass in label prop instead of using restProps

* 2777 Fix mysterious linter error

* Update changelog to fix PR number 2791

* Fix merge conflict

* Update CHANGELOG.md

Co-authored-by: pngwn <hello@pngwn.io>
2022-12-14 22:13:30 +00:00
Freddy Boulton
9c8fa8bf45
Create docs for 3.13.0 + fix requirements.txt (#2811)
* Create docs + fix bug

* Changelog
2022-12-14 09:33:52 -05:00
Abubakar Abid
53005ab88a
Switch from SSH tunneling to FRP (#2509)
* FRP Poc (#2396)

* FRP Poc

* Gracefully handle exceptions in thread tunneling

* comments

* Fix share error message when files are built locally (#2502)

* fix share error message

* changelog

* formatting

* tunneling rename

* version

* formatting

* remove test

* changelog

* version

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

* 2509

* updated url to testing.gradiodash.com

* gradiotesting

* format, version

* gradio.live

* temp fix for https

* remove unnecessary tests

* version

* updated tunnel logic

* formatting and tests

* load testing

* changes

* Make private method + generate privilege key (#2519)

* rm load test

* frp

* formatting

* Update run.py

* Update run.py

* updated message

* share=True

* [DO NOT MERGE] Add pymux for FRP (#2747)

* Add pymux for FRP

* Cleaning pyamux

* Cleaning pyamux + make it work

* Forgot the thread

* Reformat

* some logs to be removed afterwards

* added share to hello world

* Transform into object

* I guess it's cleaner now

* Handle 404 + Transform to object

* Fix params names

* Add debug

* windows fix

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

* removed share=True

* formatting

* hello world notebook

* version

* fixes

* formatting

* testing tunneling exists

* tests

* formatting

* lint

* Remove asyncio + kill proc on exit

* version

* version

* update changelog

* explicit message about reporting

Co-authored-by: Adrien <adrien@xcid.fr>
Co-authored-by: Wauplin <lucainp@gmail.com>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-12-14 08:10:45 -06:00
Abubakar Abid
5182460886
Patching test_get_ip attempt 2 (#2810)
* ip-patch-2

* formatting

* patch 2
2022-12-13 20:30:47 -06:00
Abubakar Abid
b492212c02
Patch ip test (#2808)
* patch ip test

* changelog
2022-12-13 17:15:14 -06:00
Abubakar Abid
c126e62970
Add support for numpy array and other types to gr.Dataframe() initial value (#2804)
* bigquery draft

* updated guide

* orjson fix

* formatting

* changelog

* rm guide
2022-12-13 17:01:27 -06:00
Abubakar Abid
39ffe9df4a
Typo in the parameter visible in templates.py (#2805)
* bigquery draft

* updated guide

* updates

* changelog

* fixed typos in kwargs

* revert to main

* changelog

* fix reversion

* removed requires_permissions
2022-12-13 13:48:20 -06:00
Freddy Boulton
08f0ac23b5
v3.13.0 Release notes (#2801) 2022-12-12 13:10:08 -06:00
Abubakar Abid
db48356832
Revert #2760 (#2799)
* changelog

* changelog
2022-12-12 13:10:39 -05:00
Freddy Boulton
3672e17256
Terminate generating events early if the session is closed (#2783)
* Return early if no awake events

* Add to changelog

* Add test

* Clarify when events are cancelled in the docs
2022-12-12 09:15:50 -05:00
Alexandre Payot
c70f8fedd4
Merge highlighted text when neighbors (#2767)
* Merge highlighted text when neighbors

In the previous implementation dictionary inputs were not correctly
processed meaning: a None token was added on the empty string between
each entity. That None entry is removed letting neighbouring entities
be merged.

* Add changelog

* Add test

* Improve API compatibility and fix test

* Fix lint

* Strip out the empty entries on merge

* Test against the right reference

* fix changelog

* Apply suggestions from code review

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

* Remove additonal merge adjacent

* Fix lint

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-09 17:42:44 -08:00
Ali Abdalla
8f8ba68adb
Deindex share URLs from search (#2772)
* add robots.txt to routes

* changelog

* disallow only on share

* format backend
2022-12-09 14:20:10 -08:00
Ali Abdalla
9af348cddd
Redirect old links and fix broken ones (#2774)
* redirect old links

* clean up nginx

* fix broken link in changelog

* fix broken links in guide

* fix broken links in other guide

* fix broken links in other guide

* move redirects from jinja to nginx

* changelog

* Update guides/06_other_tutorials/create_your_own_friends_with_a_gan.md

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-09 12:23:47 -08:00
Freddy Boulton
9e04e543b6
Add Scatterplot Img to Changelog (#2782) 2022-12-09 10:47:05 -05:00
Freddy Boulton
f60053d85f
gr.ScatterPlot component (#2764)
* Try clean install

* Resolve peer dependencies?

* CHANGELOG

* Add outbreak_forcast notebook

* generate again

* CHANGELOG

* Add image to changelog

* Color palette

* Fix colors + legend

* Tooltip

* Add axis titles

* Clean up code a bit + quant scales

* Add code

* Add size, shape + rename legend title

* Fix demo

* Add update + demo

* Handle darkmode better

* Try new font

* Use sans-serif

* Add caption

* Changelog + tests

* More tests

* Address comments

* Make caption fontsize smaller and enable interactivity

* Add docstrings + add height + width

* Use normal font weight

* Make last values keyword only

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

* Fix typo

* Accept value as fn

* reword changelog a bit

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-09 10:14:07 -05:00
Freddy Boulton
2a773d56ac
Fix preprocessing for audio input pipelines in external.py (#2779)
* Fix bug in loading audio

* Changelog

* Add test

* Fail if error doesn't come from rate limit

* lint

* update model examples

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-09 09:12:19 -05:00
Ajinkya K Mulay
76c4a553f5
Add backend validation for Slider, Radio, and CheckboxGroup (#2760)
* Add backend validation for form limitations [slider, radio, checkboxgroup]

Adds a preprocessing step for the slider, radio, and checkboxgroup components, as demonstrated in the issue "No backend validation for form limitations #1071."

* Update gradio/components.py

* Update gradio/components.py

* Update gradio/components.py

* fixes to logic

* updated tests

* formatting

* changelog fix

* revert test requirements

* delete artifact

* sanitizing docstrings

* comments

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-08 20:04:42 -08:00
Paulo A
728f3a960c
Add pt-br.json (#2753)
* Add pt-br.json

* Fix json name, changelog

* Format file

* Fix json name

* Fix CHANGELOG.md

* Rename pt-br.json to pt-BR.json

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update i18n.test.ts

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-12-08 19:18:02 -08:00
Ali Abdalla
849d54c0e7
fix changelog nav (#2761) 2022-12-03 21:32:54 -08:00
Freddy Boulton
bed288a509
Add support for altair plots (#2741)
* Try clean install

* Resolve peer dependencies?

* frozen lockfile install

* Explicitly use version 16

* Add env

* Add altair demo

* Add unit test

* CHANGELOG

* Add image to changelog

* Add outbreak_forcast notebook

* Try again

* generate again

* Update ui/packages/plot/src/Plot.svelte

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

* Fix title

Co-authored-by: aliabid94 <aabid94@gmail.com>
2022-12-02 14:53:42 -03:00
Abubakar Abid
82cd554ff2
Adds missing parameters to Blocks.load() (#2755)
* added

* load
2022-12-01 17:52:08 -06:00
Abubakar Abid
588b0f7b2d
Show image thumbnails when example directory is provided (#2745)
* examples

* fixes

* formatting, changelog

* fix tests

* update documentation

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-12-01 13:41:54 -06:00
Freddy Boulton
dd90b37c9b
Update Label color from backend (#2736)
* Implement label improvements

* Fix tests + lint

* Update null case

* Types + changelog

* Add gif to changelog

* Changelog + implement for confidences

* Reduce dupe

* Change API - only use string - no function

* Update API in CHANGELOG

* Update comment

* misc fixes
2022-12-01 14:30:11 -05:00
Abubakar Abid
5ce13ab6cb
Resize images for chatbot (#2748)
* chatbot image size

* update changelog
2022-11-30 10:13:34 -06:00
Abubakar Abid
cc197e4f20
release-3.12.0 (#2743)
* release-3.12.0

* changelog fix

* changelog fix
2022-11-29 15:47:09 -06:00
Abubakar Abid
5c8e7887dc
Add Markdown support in chatbots (#2731)
* started working on this

* demo

* added markdown support

* notebook

* changelog

* tests

* chatbot

* formatting
2022-11-29 14:26:21 -06:00
Kashif Rasul
d79039beb1
Latex support (#2696)
* initial use of dollarmath plugin

* add frontend support

* chnages

* changes

* changes

* changes

* changes

* fix

* added latex to kinematics blocks

* changes

* Update CHANGELOG.md

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

* added example to changelog

* remove param

* doc fix

* fixes

* latex noteboox fix

* fix

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-29 11:26:17 -08:00
Freddy Boulton
182f79bfaa
Move accordion CHANGELOG entry to next release (#2737)
* Move accordion CHANGELOG entry to next release

* trigger ci
2022-11-28 18:43:58 -05:00
Freddy Boulton
5b71ff7e6f
Update accordion from backend (#2690)
* Update accordion from backend

* Update changelog

* Add gif to changelog

* Use reactive values
2022-11-28 18:12:24 -05:00
Ali Abdalla
19462299f1
Performance improvements to docs (#2730)
* load gradio js only on example click

* fix layout shift

* fix memory/cpu issues

* bring back loading gradio js for embedded components

* load gradio js on page load only for desktop

* small optimizations

* fix preload

* mobile responsive

* small fixes

* mobile responsiveness fix

* better font loading

* changelog
2022-11-28 11:23:38 -08:00
SkyTNT
2c04f77281
Fix filename too long in processing_utils.decode_base64_to_file and processing_utils.create_tmp_copy_of_file (#2685)
* fix filename too long

* move to strip_invalid_filename_characters

* test

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-27 20:55:10 -06:00
CoffeeVampir3
6c73e79c4e
Fixed a type bug where the validation was "binary" (#2727)
* Fixed a type bug where the validation was "binary"

In line 2113 the type was validated as either file or binary:
```python
        valid_types = ["file", "binary"]
        if type not in valid_types:
            raise ValueError(
                f"Invalid value for parameter `type`: {type}. Please choose from one of: {valid_types}"
            )
```

However line 2183 preprocess single file wanted either "file" or "bytes"
```python
            elif self.type == "bytes":
```

I have arbitrarily picked binary as the one to match, but now they are both consistent.

* added test, changelog, formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-27 20:12:58 -06:00
Yujie He
f9f1f41d42
Enable requests timout for version_check (#2729)
* Enable timeout for utils.check_version()

* fix black

* Update CHANGELOG.md

* Update CHANGELOG.md
2022-11-27 19:41:28 -06:00
Andri Danusasmita
96642a4526
docs(guides): fix typos (#2722)
* docs(guides): fix typos

* docs: changelog entry

* add to contributors shoutout

Co-authored-by: Andri Danusasmita <andri.danusasmita@nri.co.id>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2022-11-25 10:35:00 -08:00
Ali Abdalla
78796f6efe
Fix id clashes in docs (#2713)
* fix id clashes

* changelog
2022-11-23 11:53:37 -08:00
Ali Abdalla
a433933dbc
Make try examples button more prominent (#2705)
* make try examples button more prominent

* changelog
2022-11-23 10:38:55 -08:00
Abubakar Abid
a1cb14ba95
version + changelog (#2710) 2022-11-22 22:57:14 -06:00
Abubakar Abid
8793719924
Adds better warnings / error messages for gr.Interface.load() (#2694)
* added better docs

* formatting

* changelog
2022-11-22 22:44:47 -06:00
Abubakar Abid
69146696d2
Increase websocket size to 1 GB (#2709)
* websocket size

* changelog
2022-11-22 22:37:05 -06:00
Ali Abdalla
4b0820a9fb
Apply different formatting for the types in component docstrings (#2707) 2022-11-22 19:21:15 -08:00
Ali Abdalla
67275ec1d6
Add open in colab buttons to demos in docs and /demos (#2608)
* add generate_notebooks and run it

* add buttons to demos tab

* add buttons to docs

* add github check

* fix erros

* Update run.py

* Update run.py

* fix github action

* add nbformat

* wget files from demo directory

* testing with regex

* typo in github action

* cd first

* correct notebooks

* remove prit

* testing

* regenerate ids in notebooks

* testing action

* testing action

* testing action

* sort files before wget so no git diff

* skip DS store and others as sub files

* example demo change without notebook change

* fixes

* example demo change without notebook change

* example regenerated notebooks

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update .github/workflows/check-demo-notebooks.yml

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

* gh action comments

* gh action syntax

* gh action syntax fixes

* test demo change without generating notebooks

* ran the suggested command

* remove unnecessary script

* add notebook for upload button demo

* switch to pull_request_target

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-22 16:56:46 -08:00
Julien Chaumond
c99a323ccf
Embeds: support <gradio-app host="julien-c-coqui.hf.space"></gradio-app> (#2692)
* to support `<gradio-app host="julien-c-coqui.hf.space"></gradio-app>`

* Fix iframe srcs

* prettier

* missed ones with `gradioiframe`

* embeds

* changelog

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-22 14:12:14 -06:00
Julien Chaumond
7719fae341
Update "How to Embed" doc (#2698)
* update Embedding doc

* changelog

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-22 13:23:41 -06:00
Dawood Khan
b5f22671a2
Add Upload Button (#2591)
* add upload button

* upload button

* changelog

* Update CHANGELOG.md

* format

* update file component

* upload button fixes

* label

* remove fileupload changes

* remove file component changes

* restore lock file

* pnpm lock file

* Update CHANGELOG.md

* fixes

* fixes

* more fixes

* fix tests

* fixes

* lockfile

* fix test

* Update gradio/components.py

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-21 13:34:31 -05:00
aliabid94
084b2b832e
Make login page UI consistent (#2684)
* changes

* changes

* changes

* capitalize login
2022-11-21 12:01:57 -06:00
Victor Muštar
70227354e6
UI update: API documentation page (#2652)
* changes

* update UI

* ui update

* add font weight 600 to google font <link>

* import paths

* changes

* changes

* changes

* changes

* Update ui/packages/app/src/ApiDocs.svelte

Co-authored-by: Victor Muštar <victor.mustar@gmail.com>

* changes

* changes

* changes

* changes

* changes

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-20 16:21:01 -06:00
Abubakar Abid
5e148c3752
Adding ability to access in Fastapi request object into your function (#2641)
* fastapi requests

* formatting

* implement

* fix

* formatting

* formatting

* changelog

* added demo

* remove print

* added to guide

* changes for queuing

* changes to gr.Request

* formatting

* formatting

* fixes

* lint

* fixed tests

* fix batching

* fixing tests

* cleanup

* lint

* added tests; fixed review

* improve docs
2022-11-19 00:52:06 -08:00
Abubakar Abid
cea1c35c89
Release 3.10.1 (#2673)
* release 3.10.1

* changelog
2022-11-18 11:37:18 -08:00
aliabid94
6798ea38d7
Cleanup colab (#2612)
* changes

* changes

* changes

* changes

* Update gradio/strings.py

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-18 09:58:34 -08:00