Commit Graph

38 Commits

Author SHA1 Message Date
Abubakar Abid
847247e1dd
version (#3990) 2023-04-27 16:35:55 -04:00
Freddy Boulton
2a59ec04fa
Fix view_api bug where unnamed rotes where showing api_name instead of fn_index (#3972)
* Fix view_api bug

* Add to changelog

* Rework test
2023-04-26 18:38:46 -04:00
Aarni Koskela
37d52a753c
CI: only run backend lints once, not in all test environments (#3960)
* CI: only run backend lints once, not in all test environments

* Add needses
2023-04-26 15:41:06 -04:00
Freddy Boulton
f886045535
Use local demos for client tests (#3975)
* Fix tests

* Fix tests

* Address comments
2023-04-26 11:11:28 -04:00
Freddy Boulton
d835c9a816
Support gr.Progress() in python client (#3924)
* Add progress message

* CHANGELOG

* Dont use pydantic

* Docs + local test

* Add gr to requirements

* Remove editable install

* make a bit softer
2023-04-24 12:52:10 -04:00
Tenzin
3b114cbc2b
Fixes typos (#3931)
* Fixes typos

* Update CHANGELOG.md

---------

Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
2023-04-21 11:00:57 -04:00
Abubakar Abid
7a04ebe7fd
Fix some documentation-related issues in Guides (#3903)
* client doc fixes

* simplify demo

* added guides

* chatbot guide

* notebooks

* format
2023-04-19 14:38:11 -04:00
Abubakar Abid
1f246d9d1e
changelog 0.1.3 (#3862) 2023-04-14 17:47:43 -07:00
Freddy Boulton
7ef0439d3c
Fix video serializing in client (#3860)
* Fix video serializing in client

* Add to changelog

* Remove print
2023-04-14 17:07:19 -07:00
Abubakar Abid
d3b7f73bcf
Update view api page to use Python client (#3765)
* Update view api page

* simplify

* update

* changes

* changes

* updated info

* formatting

* changes

* fixes

* save

* moved

* remove test input

* tweaks

* formatting

* add raw

* serialize

* fixes

* refactor

* fixes

* fixes

* Fetch api

* lower case

* view api

* fix tests

* format

* rough design

* readme

* api docs

* examples

* format

* formatting

* format

* version

* client changes

* formatting

* update client

* more example inputs

* api docs fixes

* remove notebook

* fix demo

* demo notebook

* styling on code snippet

* formatting

* fix audio, model3d

* format

* fix tests

* version

* cleanup

* format

* format

* format

* fixes

* version

* fix tests

* version

* format

* test

* format

* changelog

* changelog

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2023-04-13 16:20:33 -07:00
Abubakar Abid
40b30a683b
[WIP] Client duplicate fixes (#3843)
* client duplicate fixes

* fixes

* formatting

* changes

* fixing tests

* formatting
2023-04-13 12:30:11 -07:00
Abubakar Abid
9f4f851d68
Python client Guide (#3788)
* guide

* guide

* Apply suggestions from code review

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

* add cancel

* remove duplicated docs

* updates

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
2023-04-12 13:44:38 -07:00
Abubakar Abid
c3e239fca0
changelog for client (#3761) 2023-04-12 13:35:34 -07:00
Abubakar Abid
52d0885937
Allow client to be duplicated from an existing Space (#3809)
* client

* readme

* readme

* fixes

* cleanup

* error messages

* format

* updates

* format

* build

* fixes

* fix tests

* Update client/python/gradio_client/client.py

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

* set timeout

* rename

* format

* rename

* sleep timeout

* format

* mock secrets

* format

* format

* docstring

* fix test

---------

Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-04-12 13:26:37 -07:00
Freddy Boulton
00d7a5ce24
Python Client: Handle invalid space state (#3822)
* Raise error on status check

* Add BUILDING

* Remove SLEEPING
2023-04-11 22:38:17 -04:00
Greysuki
54af6ae290
Adding subtitles to gr.Video (#3673)
* v2 version now accepts video and subtitle format inputs.

* remove debug log and some format issue

* Update CHANGELOG.md

* Upload components.py and regenerate demo

* fix components and add comment to function

* fix postprocess return format

* changelog

* demo change to gr.Interface type

* fix file_types

* fixes

* added video serializer

* clean up preprocess

* clean up postprocess

* formatting

* frontend

* fixed serialization

* dataclass

* fix serialize

* version

* fix tests

* version

* changelog

* typing

* version

* changelog

* version

* versin

* fix tests

* fix tests

* backend

* test

* changes

* relax test

* fix demo

* notebook

* changes

* fix

* changes

* Update gradio/components.py

* Update client/python/gradio_client/client.py

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-04-11 16:06:48 -07:00
space-nuko
5a7610950e
Fix sketch tool gr.Image not filling up the entire component size (#3649)
* Fix sketch tool `gr.Image` not filling up the entire component size

* Update changelog

* version

* version

* changes

* changes

* Update js/atoms/src/Block.svelte

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

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: aliabid94 <aabid94@gmail.com>
2023-04-10 14:27:02 -07:00
Freddy Boulton
72c9636370
Python client cancel jobs (#3787)
* Working impl

* Add tests:

* formatting

* Fix typo

* Always reset iterator state

* Add httpx

* Fix test

* Fix test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-09 07:22:49 -07:00
Freddy Boulton
1def8df6dd
Python Client: Upload files via /upload for File components (#3771)
* Add tests

* Fix tests

* Remove redundant test

* fix for windows

* Add tests

* Fix tests

* Remove redundant test

* fix for windows

* Add uploadbtn

* Add support for upload btn

* revert

* Add size to FileSerializable

* Serialize multiple files

* lint

* Make changes to deserialize

* Fix multiple file upload case

* Modify test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-07 19:42:59 -04:00
Abubakar Abid
b456feb5c4
Py client verbose (#3781)
* verbose flags

* fixes
2023-04-06 16:41:37 -07:00
Abubakar Abid
5f8186218c
Document python client in gradio.app/docs (#3764)
* document py client

* more changes

* update docs

* changes

* fix tests

* formatting

* stash

* fix tests

* documentation

* more docs

* gradio client

* changes

* rework documentation

* add to docs

* modify dockerfile

* gradio client

* address feedback

* formatting

* gradio client version

* fix tests

* tweaks to website

---------

Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2023-04-06 12:58:42 -07:00
Freddy Boulton
a828b6088c
Make Client Jobs Iterable (#3762)
* Add iterator

* Break if done

* Add test for early termination
2023-04-05 14:19:05 -04:00
Freddy Boulton
9325cba14c
Get Intermediate Results from Python Client (#3694)
* Add status + unit test (flaky) for now

* Install client

* Fix tests

* Lint backend + tests

* Add non-queue test

* Fix name

* Use lock instead

* Add simplify implementation + fix tests

* Restore changes to scripts

* Fix README typo

* Fix CI

* Add intermediate results to python client

* Type check

* Typecheck again

* Catch exception:

* Thinking

* Dont read generator from config

* add no queue test

* Remove unused method

* Fix types

* Remove breakpoint

* Fix code

* Fix test

* Fix tests

* Unpack list

* Add docstring

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-04 17:58:25 -04:00
Abubakar Abid
c4ad09b631
Adds a pypi release action for the gradio python client (#3743)
* release action

* fixes

* name

* Update version.txt

* Update version.txt

* update

* fixes

* version

* rename

* action

* fix token

* custom dir

* fixes

* change password

* revert back to token

* scripts

* remove twine
2023-04-04 13:51:51 -07:00
Freddy Boulton
070b304e09
CI tweaks (#3752) 2023-04-04 14:02:20 -04:00
Freddy Boulton
46ee226d8c
Add root_url to serializers in gradio_client (#3736)
* Add root_url to serializers

* Add url fix

* Respect fn parameter

* Fix docstring

* Add other test

* Pass to method
2023-04-04 13:35:12 -04:00
Freddy Boulton
b97a61b83a
Import Literal from typing extensions in client (#3741)
* Fix typing extensions

* Import typing_extensions

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-03 19:17:00 -07:00
Aarni Koskela
ef3862e075
Switch linting to Ruff (#3710)
* Sort requirements.in

* Switch flake8 + isort to ruff

* Apply ruff import order fixes

* Fix ruff complaints in demo/

* Fix ruff complaints in test/

* Use `x is not y`, not `not x is y`

* Remove unused listdir from website generator

* Clean up duplicate dict keys

* Add changelog entry

* Clean up unused imports (except in gradio/__init__.py)

* add space

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-04-03 15:48:18 -07:00
pngwn
48e8b113f4
node support for js client (#3692)
* bundle js client + gen types

* changeset

* changeset

* fix bugs

* fix deps

* fix deps

* format

* fix ci

* fix types
2023-04-03 14:33:01 +01:00
Abubakar Abid
f46f5f9867
Fix some bugs related to Python client (#3721)
* client format

* docs

* formatting

* fix tests

* fixed bug

* api endpoint changes

* fix tests

* fix tests

* formatting

* Add support for sessions [python client] (#3731)

* client

* add state and tests

* remove session param
2023-04-02 17:28:46 -05:00
Freddy Boulton
da7d1df585
Fix Serializer Mapping (#3722)
* Fix mapping and test

* Bump gradio version

* Revert gradio version bump
2023-04-01 14:07:15 -05:00
Freddy Boulton
f73155ed42
Add status for Python Client Jobs (#3645)
* Add status + unit test (flaky) for now

* Install client

* Fix tests

* Lint backend + tests

* Add non-queue test

* Fix name

* Use lock instead

* Add simplify implementation + fix tests

* Restore changes to scripts

* Fix README typo

* Fix CI

* Add two concurrent test
2023-03-29 18:41:12 -04:00
Abubakar Abid
2a8c82de01
Documentation-related fixes to the python client (#3663)
* docstring

* add documentation

* added more serialization classes

* format

* info

* is valid

* formatting

* changes

* fixups

* fix tests

* machine readable

* formatting

* client

* format

* tweaks on printing

* version

* linting

* fix tests

* update pypi requirements

* updates

* type ignore'

* fixes

* formatting
2023-03-29 15:00:20 -07:00
Abubakar Abid
dc37ddb739
fix sort script (#3696)
* fix sort script

* formatting

* script
2023-03-29 16:39:40 -04:00
Freddy Boulton
0b91a3363b
Add job for python client ci (#3674)
* Add job + lint

* Fix path

* Fix path

* Fix path

* Checkout

* Add test requirements

* Fix syntax

* Fix test

* Lint

* Fix deps + README

* Move dependency
2023-03-28 18:52:56 -04:00
Omar Sanseviero
a46b1806bb
Nit in ValueError (#3669)
* Nit in ValueError

* CHANGELOG

---------

Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-03-28 13:23:15 -04:00
pngwn
ae4277a9a8
move files (#3605)
* move files

* commit the rest of the files

* fix lockfile

* fix workflow

* fix type errors

* fix tests

* only run ci when certain files change

* run correct test command in ci

* version

* fix pypi script

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-03-27 16:12:58 -07:00
Abubakar Abid
6e6121a1ac
Sets up the Python gradio client (#3300)
* placeholder

* changelog

* added to readme

* client

* implement futures

* utils

* scripts

* lint

* reorg

* scripts

* serialization

* cleanup

* fns

* serialize

* cache

* callbacks

* updates

* formatting

* packaging

* requirements

* remove changelog

* client

* access token

* formatting

* deprecate

* format backend

* client replace

* updates

* moving from utils

* remove code duplication

* rm duplicates

* simplify

* galleryserializer

* serializable

* load serializers

* fixing errors

* errors

* typing

* tests

* changelog

* lint

* fix lint

* fixing files

* formatting

* type

* fix type checking

* changelog

* changelog

* Update client/python/gradio_client/client.py

Co-authored-by: Lucain <lucainp@gmail.com>

* formatting, tests

* formatting, tests

* gr.load

* refactoring

* refactoring'

* formatting

* formatting

* tests

* tests

* fix tests

* cleanup

* added tests

* adding scripts

* formatting

* address review comments

* readme

* serialize info

* remove from changelog

* version 0.0.2 released

* lint

* type fix

* check

* type issues

* hf_token

* update hf token

* telemetry

* docs, circle dependency

* hf token

* formatting

* updates

* sort

* script

* external

* docs

* formatting

* fixes

* scripts

* requirements

* fix tests

* context

* changes

* formatting

* fixes

* format fix

---------

Co-authored-by: Lucain <lucainp@gmail.com>
2023-03-23 15:33:44 -07:00