Commit Graph

40 Commits

Author SHA1 Message Date
Abubakar Abid
c977ef1fa8
Supports gr.update() in example caching (#2309)
* support for update

* formatting

* testing

* fixes to tests

* fixes to tests

* fix tests

* fix review comments

* Update blocks.py
2022-09-21 11:53:06 -05:00
Freddy Boulton
f346118133
Show view api button even if there are no named api routes in the app (#2250)
* Show message when no named api routes

* Lint

* Change text slightly

* Add show_api to launch method + fix text

* Undo changes to demos

* Change url example
2022-09-15 11:11:31 -04:00
Freddy Boulton
422de63663
Fix postprocess when value is a dict with only one key (#2242)
* Unwrap + test

* Update tests + use resolve_singleton

* Undo test change
2022-09-14 12:06:32 -04:00
Abubakar Abid
2942e24aa3
Quick fix for partial functions (#2235)
* fix for partial

* added test

* fixed tests by adding self
2022-09-12 17:58:17 -07:00
Abubakar Abid
bf1510165d
Support for iterative outputs (#2189)
* Support for iterative outputs (#2162) (#2188)

* added generator demo

* fixed demo structure

* fixes

* fix failing tests due to refactor

* test components

* adding generators

* fixes

* iterative

* formatting

* add all

* added demo

* demo

* formatting

* fixed frontend

* 3.2.1b release

* removed test queue

* iterative

* formatting

* formatting

* Support for iterative outputs (#2149)

* added generator demo

* fixed demo structure

* fixes

* fix failing tests due to refactor

* test components

* adding generators

* fixes

* iterative

* formatting

* add all

* added demo

* demo

* formatting

* fixed frontend

* 3.2.1b release

* iterative

* formatting

* formatting

* reverted queue everywhere

* added queue to demos

* added fake diffusion with gif

* add to demos

* more complex counter

* fixes

* image gif

* fixes

* version

* merged

* added support for state

* formatting

* generating animation

* fix

* tests, iterator

* tests

* formatting

* tests for queuing

* version

* generating orange border animation

* testings

* added to documentation

Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-09-08 07:35:31 -07:00
Freddy Boulton
6c1bfbb42c
Fix bugs with gr.update (#2157)
* Use void to reset to original state

* Cosmetic fixes to comments

* Use keyword

* Set default value to no value

* Fix test

* Make private

* Improve comment on _Keywords.NO_VALUE

Improve comment

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

* Use NO_VALUE in `test_blocks`

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

* Update test/test_blocks.py

Use NO_VALUE in tests

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-09-06 17:08:38 -04:00
Abubakar Abid
4d58ae79b3
Improvements to State (#2100)
* state

* state fix

* variable -> state

* fix

* added state tests

* formatting

* fix test

* formatting

* fix test

* added tests for bakcward compatibility

* formatting

* config fix

* additional doc

* doc fix

* formatting
2022-08-29 09:53:05 -07:00
Abubakar Abid
4a1321ce8a
Updated our analytics on creation of Blocks/Interface (#2082)
* added version to analytics

* formatting

* fix flake

* disabled analytics on anything that runs via ci/cd

* formatting
2022-08-25 13:23:28 -07:00
Freddy Boulton
e2dc87aa2b
Reset components to original state by setting value to None (#2044)
* Fix + test

* Fix test

* Rename demo file

* Delete unused demo

* Refactor into independent demos

* change (#2059)

* Remove chatbot

Co-authored-by: aliabid94 <aabid94@gmail.com>
2022-08-22 16:04:59 -04:00
Freddy Boulton
1fcff2d710
Allow Users to set random value on sliders on app load (#1935)
* Allow value=random for slider

* Commit all files

* Remove commented out breakpoint

* Remove unused imports

* Always bypass queue

* Lint

* Add randomize parameter

* Update docstring

* Add load_fn logic

* Add new random logic

* Add kitchen sink random

* Add random kitchen sink

* Fix tests + lint

* Add test all components accept load_fn

* Update docstring

* Address final comments

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-05 18:51:03 -04:00
Abubakar Abid
4149d00822
integrate() method moved to Blocks (#1776)
* integrating blocks

* formatting

* added tests

* tests

* formatting

* added integrate() to docs

* typing

* typing
2022-07-18 22:47:40 -07:00
Abubakar Abid
44e9a4d054
Fix assert_configs_are_equivalent_besides_ids() (#1700)
* fixed importlib

* reverted pkg resources

* fixed assert

* fixed xray config

* formatting

* ignored status tracker

* assert

* added copy

* formatting

* addressed feedback

* formatting

* unnecessary copy
2022-07-05 15:19:41 -07:00
Abubakar Abid
00a1894bf5
fixed load from spaces + added test (#1636)
* fixed load from spaces + added test

* formatting

* removed print
2022-07-01 20:21:54 -07:00
Edoardo Abati
db36d6880e
Changed share argument default in .launch method (#1449)
* changed default of share argument

* make share=False raise an Exception when localhost not reachable

* using self.share across the launch method

* reverted docstring to previous sentence

* added getter and setter for self.share

* added tests for setting Blocks.share

* fixed test

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-03 11:59:50 -07:00
aliabid94
d35e06abe7
Minor cosmetic changes (#1383)
* changes

* pass tests

* change to source sans

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-26 14:33:28 -07:00
Abubakar Abid
cb2713e705
Getting Interface.load() working for 2.x and 3.x models and Spaces (#1361)
* version

* refactor for model and 2.x spaces

* fixing tests

* fixed tests

* getting there...

* formatting

* formatting

* fixes

* formatting

* external dependencies working

* formatting

* loading from 3.x

* changes

* wow finally it's working

* fixed formatting

* better error for spaces

* better error for spaces

* fixed 3.x bug

* formatting
2022-05-26 14:21:51 -07:00
Ömer Faruk Özdemir
e4b5d4c1b7
Reload mode on (#1278)
* reload-mode

-trys save

* reload-mode

- create minimal reloading example

* reload-mode

- create minimal reloading examples

* reload-mode

- amend

* reload-mode

- add user_mode

* reload-mode

- tweaks

* updated PyPi version to 3.0.3

* reloading

* reload

* formatting

* flexibility in naming

* added dev_mode flag to config

* added app id

* frontend changes

* changed debug level to warning to make less verbose

* Update ui/packages/app/src/main.ts

* fixed tests

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-05-23 14:38:53 -07:00
Abubakar Abid
74703898c6
Model3d fix (#1342)
* fixing postprocessing

* fixed value

* formatting

* fixes

* model3d

* typing

* formatting

* formatting

* components

* fixed defaults

* fixed tests

* formatting

* removed unused import typing error

* fixed up model3d tests

* model3d

* formatting

* fix default value interactive bug

Co-authored-by: Dawood <dawoodkhan82@gmail.com>
2022-05-20 17:53:27 -07:00
Abubakar Abid
2adb841316
Jupyter extension for easier development with Blocks (#1321)
* jupyter magic

* formatting

* test fix

* formatting

* simplifications

* formatting
2022-05-18 15:14:53 -07:00
aliabid94
33ef309451
Allow Custom CSS (#1170)
* changes

* css changes

* updated PyPi version to 2.9b24

* Revert "updated PyPi version to 2.9b24"

This reverts commit 48f678f491.

* Revert "css changes"

This reverts commit d31cd525a4.

* Revert "changes"

This reverts commit fadcb12ffe.

* reverting

* reverting

* changes

* changs

* Revert "changs"

This reverts commit 49d815f6fe.

* Revert "changes"

This reverts commit 481d7c21c4.

* changes

* format

* changes

* format

* test fix

* test fix

* test fix

* fix tests

Co-authored-by: Ali Abid <aliabid94@gmail.com>
2022-05-11 21:40:41 -07:00
Ömer Faruk Özdemir
a88c017f87
async-function-support (#1190)
* async-function-support

- add async function support to Blocks

* async-function-support

- resolve conflicts

* async-function-support

- add error to Interface for async functions

* async-function-support

- add test

* async-function-support

- add test packages

* async-function-support

- add test packages
2022-05-11 23:10:50 +03:00
aliabid94
ce47c48ebc
Update component config (#1089)
* first commit

* changes

* restore defualt_value name

* changes

* rm value=

* rm value=

* rm value=

* changes

* changes

* changes

* rename default_val to value

* changes

* changes

* changes

* changes

* format

* changes

* changes

* format

* test fix

Co-authored-by: Ali Abid <aliabid94@gmail.com>
2022-05-10 17:11:43 -07:00
Abubakar Abid
90f3aec388
Backend for optional labels (#1080)
* optional labels

* added prop

* Added IOComponent class

* get component fix

* fixed component function

* fixed test components

* formatting

* fixed output tests

* working on blocks tests

* fixed test blocks

* cleanup
2022-04-27 02:22:16 -07:00
Ali Abid
7bf3283954 fix css 2022-04-19 01:05:47 -07:00
Ömer Faruk Özdemir
8eae59f494
Blocks page load (#963)
* Blocks load event implemented

* tweks

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-04-08 20:54:59 +03:00
Ömer Faruk Özdemir
3c876c49ef add fake_gan demos with smaller pictures 2022-04-08 11:21:40 +03:00
Ömer Faruk Özdemir
023706136e add fake_gan demos with smaller pictures 2022-04-08 11:14:00 +03:00
Ömer Faruk Özdemir
6274b9099e
blocks-move-test-data (#927)
* blocks-move-test-data
- move test_data under gradio

* blocks-move-test-data
- typo

* blocks-move-test-data
- fix tests
2022-04-06 13:55:51 +01:00
Abubakar Abid
2fdf26d7ac merged blocks-dev 2022-04-05 12:21:48 -07:00
Abubakar Abid
541041e299 merged blocks-dev 2022-04-04 17:48:15 -07:00
Ömer Faruk Özdemir
cf6f490189 blocks-components-tests
- reformat
2022-03-30 15:34:08 +03:00
Ömer Faruk Özdemir
070b8a96b5 blocks-components-tests
- move gradio/test_data to test/test_data/media_data
2022-03-30 13:08:34 +03:00
Abubakar Abid
8daada1b40 slightly better 2022-03-29 10:59:15 -07:00
Abubakar Abid
b851831aef hacky way to get imports to work 2022-03-29 10:49:20 -07:00
Abubakar Abid
e09df09d9e fixed formatting 2022-03-29 10:38:49 -07:00
Abubakar Abid
9d7de51958 fixed config 2022-03-29 09:15:37 -07:00
Abubakar Abid
2ec8482ca6 fixed config 2022-03-29 09:14:59 -07:00
Abubakar Abid
2825ee606d resolving relative imports 2022-03-29 09:12:01 -07:00
Ömer Faruk Özdemir
acda99703e blocks-tests
- reformat
2022-03-29 18:46:42 +03:00
Ömer Faruk Özdemir
dcc9ba87c9 blocks-tests
- implement a simple test to check blocks config generation
2022-03-29 18:45:24 +03:00