Commit Graph

71 Commits

Author SHA1 Message Date
Abubakar Abid
d3371ec7d3
Fixes gr.utils.delete_none (#3188)
* changes

* added workflow

* fix action

* fix action

* fix action

* fixed delete none

* Delete benchmark-queue.yml

* Delete benchmark_queue.py

* changelog

* fixing tests

* format
2023-02-13 15:28:43 -06:00
Abubakar Abid
f37d17089d
Fixes components when loading private spaces (#3068)
* file routes

* adding access token

* add reverse proxy

* adding access token

* context

* rewrite

* frontend

* formatting

* changelog

* formatting

* fix tests

* fixed image issue

* fix frontend

* os removal

* Update test_external.py

* fixes to normalise

* version

* fixes so that functions work

* lint

* formatting
2023-02-07 07:55:51 -08:00
Freddy Boulton
32af45cd0f
Add conversational and text-to-image pipelines to Interface.load (#3011)
* Add conversational and text-to-image

* remove redundant state

* CHANGELOG

* Add media to changelog

* Lint

* Format code

* Fix typos in CHANGELOG
2023-01-18 14:49:03 -05:00
Abubakar Abid
055aab6e05
Fixing deserialize when loading external Spaces (#3004)
* deserialize

* changelog
2023-01-17 13:05:15 -08: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
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
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
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
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
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
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
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
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
Abubakar Abid
e6cda90b69
Refactoring external.py (#2579)
* pass token & add typing

* updated docstring

* reorg

* improve docs

* test for private space

* changelog

* changed asserts

* pipelines

* streamline

* formatting

* int

* dataclass

* formatting

* annotations

* formatting

* external test fixes

* formatting

* typing

* addressing review

* fix tests

* dataframedata

* refactoring

* removed unused imports

* added better error message for invalid spaces

* removed unnecessary import
2022-11-01 09:14:15 -07: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
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
phi
a36dcb5975
Resolve Gallery base64 representation issues (#2265) 2022-10-07 06:08:30 +01:00
Freddy Boulton
11379b92f1
Respect Upstream Queue when loading interfaces/blocks from Spaces (#2294)
* Fix fn used in load when queue is enabled

* Respect upstream queue

* Fix test

* Skip in 3.7

* Update logic to respect if fn does not have queue

* Fix impl + test
2022-09-21 13:18:40 -04:00
Freddy Boulton
eb81fa2cf2
Skops integration: Load tabular classification and regression models from the hub (#2126)
* MVP of skops integration

* Add unit tests

* One more case

* Fix NaNs in widget data

* Remove breakpoint

* Fix typo
2022-09-06 09:15:57 -04:00
Abubakar Abid
88e9c19c27
Cleaning up the way data is processed for components (#1967)
* remove preprocess_example

* removing methods

* added path support for images

* fixes

* video

* formatting

* fixing preprocess

* fixes

* removed from audio

* fixed file

* formatting

* serialization

* foramtting

* formatting

* removed save flag / restore flag

* formatting

* removed flagging

* removed

* load value

* fixing typing

* fixes, typing

* fixes

* file

* handling images

* formatting

* fixed serializing for flagging

* formatting

* json

* temp file

* removed processing

* changed processing

* fixed temp FINALLY

* flagging works

* fix examples test

* formatting

* async examples

* working on mix

* comment out failing test

* fixed interface problem

* fix kitchen sink deprecation warning

* gallery examples

* fixes

* fixes to serialization

* fixing label serializing

* fixed file serialization

* kitchen sink restored

* outbreak forecast updated

* formatting

* formatting and api mode

* fix 1 test :/

* fixing tests

* fixed components tests

* remvoed test files

* formatting

* fixed examples

* fixes

* formatting

* restored certain files

* added encryption

* fixed syntax mistake

* formatting

* fixed 1 test

* clean up interface

* formatting

* fixed route tests

* more fixes

* formatting

* formatting

* fixing pipeline

* format frontend

* format backend

* tweaks

* fix

* fix final test?

* merged

* Sanitize for CSV (#2017)

* sanitize for csv

* added sanitization logic

* fixed examples

* turn cache off

* fixed example caching with optional inputs

* fixed review problems

* fixed Interface.load

* updating the tests

* updating the tests

* fix

* fixed seriailizing

* testing

* rewrite run prediction

* formatting

* await

* fixes

* formatting

* finally fixed mix

* fixed tests

* formatting

* formatting

* deserialize fix

* formatting

* fixes

* fixes

* fix

* fix tests

* fixes

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2022-08-23 08:31:04 -07:00
Freddy Boulton
299ba1bd1a
Fix bug where you cannot cache examples with Interface.load (#1949)
* Possible fix

* Remove breakpoint

* Implementation

* Add unit test

* Fix test

* Lint

* Add _api_mode to interface signature
2022-08-04 20:20:44 -04:00
Freddy Boulton
9918a9540b
Mark tests as flaky and run in separate job (#1735)
* Mark tests as flaky and run in separate job

* Fix typo

* Fix typo

* Add test type to config

* Add quotes

* Rename job to test

* Rename job to test
2022-07-11 13:20:11 -04:00
Abubakar Abid
a1c391668a
Exposing examples as a component for Blocks (#1639)
* examples as component

* renamed examples

* simplify internal logic

* fix tests

* cleanup

* fixed parallel and series

* cleaning up examples

* examples

* formatting

* fixes

* added unique ids

* added demo

* formatting

* fixed test_examples

* fixed test_interfaces

* fixed tests

* removed test from now

* raise ValueError for bad parameter values

* fixing series

* fixed series

* formatting

* speed up by preprocessing examples

* fixed parameter validation logic
2022-07-06 11:23:35 -07:00
Freddy Boulton
8c9a9a9696
Fix interpretations (#1655)
* add postprocess method on component

* Add test

* Change input in external.

* Revert accidental change
2022-06-29 18:24:27 -04:00
Abubakar Abid
d10bca27c0
Skip tests that return 429 from HF Hub API (#1559)
* skip tests

* formatting

* formatting and fixes
2022-06-13 17:57:45 -07:00
Dawood Khan
f374eec22d
Fix cache examples for audio, video and image (#1459)
* image examples fix

* fix image test

* fix cache examples for audio and video

* fix tests

* fix audio test

* fix restore flagged file

* fix tests

* reformat

* tests fixes

* fix test

* reformat

* format

* fix test

* reformat

* fix image test

* renamed video demo

* removed redundant test that may have been causing rate limiting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-07 15:10:19 -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
2de9ee8bfb
update-shortcut-syntax (#1234)
* update-shortcut-syntax

- fix&update gr.component
- create a demo introducing shortcuts within Blocks

* update-shortcut-syntax

- tweaks

* update-shortcut-syntax

- tweaks

* update-shortcut-syntax

- fix formatting

* update-shortcut-syntax

- tweaks
- fix tests

* update-shortcut-syntax

- tweaks
- fix tests

* update-shortcut-syntax

- tweaks
- fix tests
2022-05-13 09:30:11 +03:00
Abubakar Abid
671147c808
Update test_external.py (#1024) 2022-04-19 08:20:09 -07:00
Ali Abid
c15885f0cc merge master 2022-04-19 00:22:43 -07:00
Abubakar Abid
d722de0a79 replaced ASR model with one that works 2022-04-07 08:57:28 -07: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
dawoodkhan82
bb26fa2821 fix asr test 2022-03-30 23:48:58 -04:00
Abubakar Abid
ca2d0b7ef2 brought back external and mix tests 2022-03-25 12:16:49 -07:00
Abubakar Abid
1d316d38a1 commented external, removed context 2022-03-24 13:32:04 -07:00
Abubakar Abid
0edf628b25 test_external passing 2022-03-23 09:25:53 -07:00
Abubakar Abid
408f743ba8 fixed external tests 2022-03-18 16:44:57 -07:00
Abubakar Abid
befa7bc8a2 fixed speech text model 2022-03-07 13:13:17 -06:00
Ömer Faruk Özdemir
972c66e09b Format-The-Codebase
- solve the flake8 warnings
2022-02-09 22:52:26 +03:00
Ömer Faruk Özdemir
3a9d018eab Format-The-Codebase
- rename a test
2022-02-09 16:15:01 +03:00
Ömer Faruk Özdemir
87d7fbee61 Format-The-Codebase
- format the codebase
- add format checkers to circleci
2022-02-09 10:40:05 +03:00
Ömer Faruk Özdemir
7619ae76d1 Accelerate-Tests
- speed up a test with a smaller model
- add torch to reqs
2022-02-09 10:24:30 +03:00
Ömer Faruk Özdemir
4d9e3f4cda Accelerate-Tests
- speed up a test with a smaller model
2022-02-09 09:38:40 +03:00
Ömer Faruk Özdemir
6a30e5d24f
Merge branch 'master' into Accelerate-Tests 2022-02-09 08:53:33 +03:00
Ömer Faruk Özdemir
82cb2de626 Accelerate Tests
- add coverage to the circleci
- combine the divided tests into single folder
- update requirements
2022-02-09 08:50:00 +03:00
Lysandre
5522fa4d6a Upgrade black to version ~=22.0 2022-02-08 13:56:13 -05:00
Ömer Faruk Özdemir
bb6805e25f Accelerate Tests
- Create local and cloud test folders and move all the tests with duration > 1 second to the cloud tests.
- Update scripts
2022-02-07 14:29:55 +03:00
Abubakar Abid
8e632b84dc Fixed audio to audio & better error messaging if Space is not loading 2022-02-03 08:33:20 -05:00
AK391
e84c5be03d add audio-to-audio 2022-02-02 18:17:50 -05:00
Ömer Faruk Özdemir
cc0cff893f Format The Codebase
- black formatting
- isort formatting
2022-01-21 16:44:12 +03:00