Commit Graph

775 Commits

Author SHA1 Message Date
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
Abubakar Abid
1c244cc342
pass in kwargs to Blocks.load() (#2669)
* pass in kwargs to Blocks.load()

* added test

* changelog
2022-11-17 17:22:16 -08:00
Abubakar Abid
1e9781cf0f
Update CHANGELOG.md (#2664) 2022-11-17 08:59:48 -08:00
Freddy Boulton
8d59c1480e
More demo fixes (#2656)
* Minor tweaks

* Fix gr outputs

* Fix changelog
2022-11-16 15:42:24 -05:00
Abubakar Abid
8ec0a1e2b8
Quick fix to gr.utils.validate_url (#2659)
* fix validate

* formatting

* fix tests

* added flaky mark
2022-11-16 12:21:51 -08:00
pngwn
4b57984ead
add password and email textbox types (#2653)
* add password and email textbox types

* changelog + fix tests

* formatting

* fix tests maybe

* fix tests

* add more tests

* whatever

* weird thing
2022-11-15 22:23:47 +01:00
Freddy Boulton
e6336d6882
Fix bug with gr.update and interactive=True (#2639)
* Fix update interactivity

* Lint

* CHANGELOG

* Fix

* Undo interactive=True

* Do not call update twice

* Add unit test

* Revert change

* Lint
2022-11-15 11:53:35 -05:00
Freddy Boulton
ebb65eb9ee
Fix loading interface with examples (#2640)
* fix examples

* Fix test

* Add unit test

* Add CHANGELOG

* Add unit test where load external

* fix for older demos

* Add comment
2022-11-15 11:20:59 -05:00
Freddy Boulton
06353ca939
Pin fastapi test version to 0.87.0 (#2647)
* Pin fastapi test version

* trigger ci

* Upgrade to 0.87

* Update txt file
2022-11-14 14:31:03 -05:00
pngwn
fd31726666
only use min height for md and html when loading (#2623) 2022-11-09 20:48:17 +01:00
Freddy Boulton
e9a8a85929
Remove duplicate line from changelog (#2624) 2022-11-09 04:43:29 -05:00
Vladimir Repin
23e6fe6bc5
Put the changelog note in the 3.9 release section (#2620)
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-11-09 04:35:42 -05:00
GLGDLY
b75b7b7475
Allow auth with using queue (#2611)
* Update queue.py

* Update queue.py

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update queue.py

* Update requirements.txt

websockets with version <=9.1 with raise TypeError: WebSocketCommonProtocol.__init__() got an unexpected keyword argument 'logger'

* fix issues after rebase

* feat Allow auth with using queue

* remove unused imports

* Update CHANGELOG.md

fix wrong position in changlog from the last pr #2428 also

* revert test_queue_enabled_for_fn that is changed due to unintended mistake

* remove comment

* update tests and merge main thread

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-11-09 04:24:51 -05:00
Ali Abdalla
a80084f3df
Dropdown for seeing docs as latest or main (#2544)
* support docs for pip and git

* upload spaces with gradio wheel

* aws

* upload wheel to aws

* fix error in docker compose

* fix dockerfile

* fix dockerfile

* fix upload demos

* fix upload demos

* styling

* fake change

* remove check_version

* fixes

* fix buttons

* fix navigation on main

* add github action

* build version docs in docker

* fix path and docker errors

* add requests

* fix command

* more docker fixes

* more docker fixes

* no prerelease

* fix restart demos

* undo fake changes, and fix build_version

* fix variable

* fix mistake

* add how to build from main

* new line to requirements

* fix instructions

* Update CHANGELOG.md

* duplicate line in Dockerfile

* switch to github actions, use separate pages

* fix issues in github action

* fix path for github action

* more fixes

* more fixes

* fix github action

* add template

* fix demos template

* update release notes for 3.9

* add -A

* refactor

* keep old version htmls

* unpin gradio version in requirements

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

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-08 13:02:05 +01:00
Abubakar Abid
010827e211
Refactoring to replace unittests with pytests (#2610)
* replace pytests with unittests

* formatting

* test blocks

* fixed test/blocks

* test components

* working on test components

* test components

* test components almost fixed

* removed unittest

* linting

* fix remaining tests

* lint

* formatting

* changelog
2022-11-08 01:37:55 +01:00
Abubakar Abid
05dcd87053
A Guide on Configuring a Gradio Queue for High-Volume Traffic (#2558)
* renamed guides and created new guide

* changelog

* more

* more text

* conc

* conc

* max performance

* guide

* finish guide

* guide

* tweaks

* tweaks

* guide

* guide
2022-11-05 18:36:46 -07:00
GLGDLY
b1cc5be78d
Update queue with using deque & Update requirements (#2428)
* Update queue.py

* Update queue.py

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update queue.py

* Update requirements.txt

websockets with version <=9.1 with raise TypeError: WebSocketCommonProtocol.__init__() got an unexpected keyword argument 'logger'

* fix issues after rebase

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-11-04 16:53:23 -04:00
Freddy Boulton
f795a4d3b1
Use read_sql in database guide (#2604)
* Move demo to gradio + fix code

* Foo

* Address comments
2022-11-04 16:31:08 -04:00
Abubakar Abid
218fb9fa65
Allow gr.Templates to take in arguments (#2600)
* template customization

* changelog

* fixes

* import

* added test

* formatting

* explicit parameters

* updated changelog

* fix typing

* fix test
2022-11-04 09:08:17 -07:00
Freddy Boulton
85e5fd0f62
Fix changelog 3.9 (#2605) 2022-11-04 11:08:06 -04:00
aliabid94
91abb3ae11
Allow gradio embeds in colab without share (#2455)
* changes

* change

* changes

* changes

* changes

* Update colab.html

* update version

* changes

* Update gradio/templates/colab.html

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

* changes

* changes

* changers

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* revert

* changes

* changes

* changes

* strings

* formatting

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: pngwn <hello@pngwn.io>
2022-11-03 15:51:30 -07:00
Abubakar Abid
43f5cf5f30
Load example from external Spaces (#2594)
* started

* loading examples

* saves

* fixes

* formatting

* iocomponent

* added support to other components

* fixed tests

* added video support

* added 1 test

* more changes

* reverted components.py

* remaining components

* formatting

* fixes

* fixes

* tests

* fixed ability to load multiple spaces
2022-11-03 12:35:56 -07:00
Vladimir Repin
ad62a8a8a3
Fixed upload dialog being showed after pressing "x" button (#2577)
* Fixed upload dialog being showed on clear #2476

* Changelog update

* Formatting fix

* click replaced with disable_click

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Dawood Khan <dawoodkhan82@gmail.com>
2022-11-02 16:28:38 -07:00
Freddy Boulton
4a51cec5b4
Call fn by api_name when using Blocks.load (#2593)
* Updated implementation + test

* Add changelog

* Fix unit test
2022-11-02 13:38:56 -04:00
Dawood Khan
3f9cf301ed
Fixing links in plotly map guide + demo (#2578)
* move demo to gradio org

* Update CHANGELOG.md

* Update CHANGELOG.md
2022-11-01 18:18:08 -04:00
Freddy Boulton
f0d1cdf08f
Allow None in as_example for files (#2588)
* Fix file examples

* Changelog

* Fix changelog version name previous release
2022-11-01 17:36:38 -04:00
Abubakar Abid
e360f159a9
Add support for loading Private Spaces using HF Token (#2568)
* pass token & add typing

* updated docstring

* reorg

* improve docs

* test for private space

* changelog

* addressing review

* fix tests

* fix websocket headers
2022-10-31 20:29:13 -07:00
pngwn
17cd9b59bd
fix embed protocol (#2571)
* fix embed protocol

* changelog

* version

* Commit from GitHub Actions (Upload Python Package)

* version

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: GH ACTIONS <abidlabs@users.noreply.github.com>
2022-10-31 12:08:45 -07:00
pngwn
36e383a9f0
fix spaces (#2567)
* fix spaces

* changelog

* tweak

* only mess with ws url in embed mode

* version

* always disregard embedding apps path when embedding

* version

* version

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-30 07:39:27 -07:00
Freddy Boulton
a23eb53e3b
Run events every given number of seconds (#2512)
* WIP

* Fix implementation

* Fix units

* Rename

* Delete dead code

* This works

* Fix tests

* Final fix - still rough

* Reduce code duplication

* Fixing bugs + test

* Changelog

* Add gif to changelog

* Update demo and remove unused imports

* undo accidental diff

* Linting

* Add to guides

* Address comments

* formatting changelog

* Fix warnings
2022-10-28 17:53:06 -04:00
Ali Abdalla
a9f6d53016
changelog update (#2564) 2022-10-28 15:53:25 -04:00
Freddy Boulton
3ca5d4fe95
Release 3.8 (#2561)
* Release 3.7.1

* Update release number
2022-10-28 11:35:04 -07:00
aliabid94
10552cb6fd
Allow user to send inputs as dictionary (#2550)
* change

* changes

* changes

* changes

* changes

* change

* changes

* changes

* changes

* changes

* changes

* format

* changes
2022-10-28 10:52:28 -07:00
Dawood Khan
28b7d7de8f
fixes plotly whitespace (#2548)
* fix plotly whitespace

* changelod
2022-10-27 16:12:21 -04:00
camenduru
cf7d44591f
fix #2536 (#2538)
* fix #2536 

thanks @pngwn

* fix #2536

* fix #2536

* changelog

Co-authored-by: pngwn <hello@pngwn.io>
2022-10-27 14:57:39 +01:00
Ali Abdalla
be4bedbc5e
temporary changelog update (#2546) 2022-10-26 21:23:43 -04:00
Abubakar Abid
76512378a8
Adds support for audio samples in float64, float16, or uint16 formats (#2545)
* fixed audio

* added some unit tests

* formatting

* formatting
2022-10-26 16:24:46 -07:00
Abubakar Abid
5c80b544ab
Better error messages (#2543)
* events fix

* changelog, format, better error msg

* changelog

* changelog

* mix errors

* formatting

* switched from error to warnings

* typo
2022-10-26 16:10:26 -07:00
Freddy Boulton
099e1e84ec
Properly dequeue cancelled events when multiple apps are rendered (#2540)
* Fix render + tests

* Add comment + changelog
2022-10-26 16:29:47 -04:00
Abubakar Abid
933feb48ad
Remove special ws path for spaces (#2528)
* remove special ws path for spaces

* changelog
2022-10-26 12:55:32 -07:00
Dawood Khan
83a038ea7a
Load Event Trigger (#2456)
* load event

* fixes

* reformat

* changelog fixes

* rename to uploadable

* formatting

* format

* add cancels

* Update CHANGELOG.md

* Create CHANGELOG.md

* Update CHANGELOG.md

* add batch
2022-10-25 20:58:12 -04:00
pngwn
5a090de94a
prevent invalid targets of events from crashing app (#2534)
* add sourcemaps to build

* logs

* filter falsey values from target_instance map

* actually fix it this time

* changelog + cleanup

* format
2022-10-26 00:57:13 +01:00
Abubakar Abid
560b3f99c0
Fixes cancels to work with multiple blocks (#2530)
* fixes cancels to work with multiple blocks

* formatting and changelog

* formatting and test

* skip test in 3.7
2022-10-25 14:54:33 -07:00
Freddy Boulton
7f9223fdbe
Prevent api requests from skipping queue (#2493)
* Prevent request to rest api from skipping queue

* Release notes

* Make changes to show_api

* Update gradio/blocks.py

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-25 11:45:15 -04:00
Freddy Boulton
943cdd5f35
Add dashboard demo to Demos tab (#2508)
* Add demo

* Changelog

* Undo

* Fix formatting
2022-10-25 11:15:18 -04:00
Abubakar Abid
0e168c4dff
Batching (#2218)
* batch

* formatting

* added parameter

* batch

* added docstrings

* correct arguments

* docstring

* adapt process_api for batch

* backend

* __call__

* more regular tests

* formatting

* cleaning up blocks.py

* __call__ works

* api route works

* first attempt at queue

* fixing tests

* fix some tests

* formatting

* removed print

* merge

* queue works!

* removed batch timeout

* removed batch timeout

* updated documentation

* fixing tests

* fixing tests

* fixing queue tests

* fixing queue tests

* formatting

* fix blocks config

* fix tests

* update documentation

* updated tests

* blocks

* blocks

* blocks

* tests

* test fixes

* more tests

* faster

* foramtting

* test fixes

* dataclasses

* fix

* revert to fix test

* fix

* fix test

* formatting

* fix tests

* refactoring examples

* formatting

* changelog

* fix examples

* formatting

* fix tests

* formatting

* catch error

* formatting

* fix tests

* fix cancel with batch

* final tests and docs

* test routes

* formatting
2022-10-24 16:32:37 -07:00
Dawood Khan
834d945b1a
Fixes plotly css issues (#2486)
* fix plotly css

* changelong
2022-10-24 11:13:41 -04:00
Rahul Varma
a18099f683
Allow render() to return self (#2514)
* Update blocks.py

Updated render() function in Blocks to return self

* Update CHANGELOG.md

* formatting

* fix changelog

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-23 05:59:15 -07:00
Abubakar Abid
1dd4231778
Fix share error message when files are built locally (#2502)
* fix share error message

* changelog

* formatting
2022-10-19 19:55:14 -07:00
Freddy Boulton
9840e87e82
Manually format changelog (#2495) 2022-10-18 16:41:24 -04:00
Freddy Boulton
668905fb3d
Fix infinite reload loop when gradio mounted as a sub application (#2477)
* Set dev mode to false in sub application

* CHANGELOG
2022-10-18 16:12:51 -04:00
Dawood Khan
8a34a799d6
clear timeseries fix (#2487) 2022-10-18 16:09:33 -04:00
Abubakar Abid
d7c96e1ad8
Adds a demo to show how a sound alert can be played when a prediction is complete (#2478)
* add sound alert demo

* changelog

* update changelog

* address suggestions
2022-10-18 13:03:07 -07:00
Abubakar Abid
081f63c5c5
Removes special characters from temporary filenames (#2480)
* remove special chars

* tests

* tests
2022-10-18 12:58:01 -07:00
Freddy Boulton
dae17bb75a
Fix video mirroring issue (#2475)
* Fix video flip + test

* CHANGELOG

* Fix python 3.7 mock syntax

* Fix python 3.7 syntax

* Use .stem

* Lint
2022-10-18 11:07:03 -04:00
pngwn
f79a76ca8f
add status tracker to md and html (#2474)
* add status tracker to md and html

* changelog

* changelog
2022-10-17 22:00:01 +01:00
Ali Abdalla
4ffab3eb6c
Small fix for version check before reuploading demos (#2469)
* fix comparison for version

* Update CHANGELOG.md
2022-10-16 22:29:55 -07:00
Freddy Boulton
831ae1405f
Cancel events from other events (#2433)
* WIP

* Use async iteration

* Format + comment

* Very hacky WIP

* Fix synchronization

* Add comments + tidy up implementation

* Remove print

* Fix rebase

* Lint

* Disconnect queue when cancelled

* Add stop button for interface automaticallY

* Unit tests + interface fixes

* Skip some tests on 3.7

* Skip in 3.7

* Fix skip message

* Fix for python 3.7

* Add stop variant to button variant type union

* CHANGELOG

* Add demos/gifs to the changelog
2022-10-14 18:43:24 -04:00
Ali Abdalla
bff43bfb65
Upload all demos to spaces (#2281)
* upload all demos in the repo to spaces

* remove upload_demos from recipes, fix error

* load docs and guides demos from spaces

* Remove old demos dir, container, nginx and docker-compose

* update landing page spaces through /demo

* fix run filenames

* skip demos without a run.py file

* fix embedding in guides and docs

* update only on version change

* fix restart script

* fix broken demos

* add component demos

* website tracking pip

* fix embedded components

* fix components

* fix extra slash

* remove footers correctly

* Update CHANGELOG.md

* fix race condition

* add inner_template to gitignore

* set runfile to run.py

* fix time.sleep after testing

* check for prereleases
2022-10-14 14:07:26 -07:00
pngwn
78ab2c8e67
fix interactivity of value-less components with no dependencies (#2459)
* fix interactivity of value-less components with no dependencies

* changelog

* changelog fix

* changelog fix

* changelog fix

* formatting
2022-10-14 17:12:42 +01:00
aliabid94
5089053052
Port reuse block fix (#2453)
* fix

* chagnes

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2022-10-13 21:15:17 -07:00
Ali Abdalla
67a5ba96b1
Fix embedded interfaces on touch screen devices (#2457)
* fix touch device issue

* Update CHANGELOG.md
2022-10-13 20:03:39 -07:00
Freddy Boulton
2fdd2396d8
Fix race condition in queue (#2374)
* Catch disconnect exception

* Misc queue changes

* Add tests

* CHANGELOG
2022-10-13 11:07:36 -04:00
Dawood Khan
1d18ddae66
Add blur event to textbox and number (#2448)
* add blur event to textbox and number

* changelog

* fixes

* fix blur for number

* reformat
2022-10-12 23:53:05 -04:00
Abubakar Abid
e935f105e1
Improvements to gr.Dataset (#2437)
* Adding example components

* formatting

* formatting
2022-10-12 15:48:53 -05:00
Abubakar Abid
3c1172404a
Update strings.py to reference new Spaces Hardware (#2423)
* Update strings.py

* Update CHANGELOG.md

* Update gradio/strings.py

Co-authored-by: Julien Chaumond <julien@huggingface.co>

* Update strings.py

* Update strings.py

* Update strings.py

* Update strings.py

* Update strings.py

* Update strings.py

Co-authored-by: Julien Chaumond <julien@huggingface.co>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-10-12 15:43:17 -05:00
Vova Zakharov
72c2ace2b8
bug fix (return ValueError → raise ValueError) (#2445)
* bug fix (return ValueError → raise ValueError)

* changelog

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-12 14:38:42 -05:00
Freddy Boulton
89fc21b17d
Install gradio from source in UI tests (#2440)
* Install gradio from source

* CHANGELOG

* Do not upgrade pip
2022-10-12 12:43:44 -04:00
Abubakar Abid
70eae89cef
Deprecates Carousel component (#2434)
* formatting

* carousel

* Update CHANGELOG.md
2022-10-12 11:37:58 -05:00
Dawood Khan
3a2de9b415
Map demo + Guide (#2402)
* map demo + guide

* fixes

* update dataset to load from hub

* remove csv file

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-11 23:51:48 -04:00
Ali Abdalla
ad2c0790b4
Automatically restart spaces if they're down (#2405)
* check and restart spaces that are down

* if no auth_token, don't break build

* add to changelog

* Update CHANGELOG.md
2022-10-10 18:42:59 -07:00
Abubakar Abid
1dd4d34933
Updates the documentation to better describe Blocks.load() (#2413)
* updated doc

* removed link change

* revert changes to inner html

* changelog

* tweaks

* formatting
2022-10-07 14:38:59 -07:00
Freddy Boulton
da93f4f004
Use async iteration for progressive outputs (#2409)
* Use async iteration

* Changelog

* Format + comment

* Changelog

* Use AsyncStopIteration

* Remove unused import
2022-10-07 17:12:07 -04:00
pngwn
996cd8b814
1711 image upload (#2410) 2022-10-07 19:21:21 +01:00
pngwn
8f43b6218b
add option to control page title, default to false (#2400)
* add option to control page title, default to false

* changelog

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-07 15:32:40 +01:00
Freddy Boulton
7305a19a30
Fix embedded demos in some guides (#2403)
* Dont load gradio web component in guides

* Changelog
2022-10-07 10:08:14 -04:00
phi
a36dcb5975
Resolve Gallery base64 representation issues (#2265) 2022-10-07 06:08:30 +01:00
Freddy Boulton
2acebe5490
Fix release notes (#2401) 2022-10-06 14:39:48 -04:00
aliabid94
ac378d0875
Stream works now (#2351)
* changes

* changes

* lazy load streaming deps

* lazy load streaming deps

* cleanup

* fix last chunks of streaming

* add changelog

* add changelog

* add changelog

* add changelog

* updated streaming demo

* renamed sst

* changes

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-05 14:11:47 -07:00
Dawood Khan
b59c45160d
Clamps values for typeable slider input when out of range (#2380)
* warning for slider type input

* fix value on blur

* remove unnecesary classes

* update changelog

* Update CHANGELOG.md
2022-10-05 14:30:40 -04:00
Freddy Boulton
a03d0ebe7c
Prevent apps from hanging when running in reload mode and error occurs (#2394)
* Fix show_error in blocks

* dd to changelog + test
2022-10-04 16:10:02 -04:00
Abubakar Abid
c3306721a4
Adds ability to disable pre/post-processing for examples (#2383)
* fixing examples

* adding parameters

* postprocess

* examples

* added tests

* changelog

* Update CHANGELOG.md

* added docstrings

* Adds ability to provide a `gr.update()` dictionary even if `postprocess=False`  (#2385)

* docs

* fixes

* added docs, fixed test

* changelog

* fix suggestoins

* formatting

* fix tests

* fix tests
2022-10-04 12:51:20 -07:00
aliabid94
1f5efa7efa
Reworking layout styling (#2291)
* changes

* changes

* changes

* changes

* changes

* changes

* version

* changes

* formatting

* version

* remove group hack

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* test

* changes

* changes

* changes

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-03 18:01:41 -05:00
Ali Abdalla
ca67384ef1
Copy changelog file in website docker (#2384)
* copy changelog file in website docker

* Update CHANGELOG.md
2022-10-03 13:31:58 -07:00
Freddy Boulton
fb7d768013
Automated Release Notes (#2306)
* add changelog file

* Check release notes

* Fix syntax

* Fix path to changelog

* Use changelog

* Add to changelog

* Add comment

* Test comment

* Use txt file for comment body

* Fix for multiline

* rendering on website, changes to changelog

* Don't use txt file

* Fix pr number

* merge

* Split it up into two

* Test fail

* Follow example

* Fix syntax

* Delete quotes

* Add syntax

* Fix names

* Fix syntax

* Modify pr template instead and remove backticks

* Check word

* changelog file fixes

* add 3.4 release notes to changelog

* add navigation

* replace pr tag and @ usernames with links

* remove empty/unused sections from rendering

* fix format of 3.4 notes

* add releases dir and 3.0-2 notes

* render from releases dir

* remove changelog file

* Fix RN check

* Fix path

* upcoming release title

* switch to periods from dashes

* add link to changelog in docs

* Add script modify files

* Modify changelog

* change to release history

* modify gh actions

* Fix syntax

* Skip draft releases during reformatting

* skip template when rendering

* modify upcoming.md to reflect real changes

* replace links with pr tag

* Add automated release notes as a new feature in upcoming

* Update .github/PULL_REQUEST_TEMPLATE.md

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

* eUpdate website/homepage/src/style.css

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

* Misc fixes

* one file at root

* Fix Changelog check

* Modify release notes format script

* Fix format script + release notes

* Add to contributing

* Undo change to release notes from testing script

* Add pr 2373 to rl

* Modify file path

* Update .github/PULL_REQUEST_TEMPLATE.md

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

* Update .github/PULL_REQUEST_TEMPLATE.md

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

Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-03 12:36:59 -07:00