Commit Graph

4373 Commits

Author SHA1 Message Date
aliabid94
99833d506e
Refactoring Layout: Adding column widths, forms, and more. (#2097)
* changes

* changes

* fix

* change

* change

* changes

* changes

* changes

* changes

* change

* remove test config outputs

* fix wflow

* attempt root user

* attempt root user

* attempt root user

* attempt root user

* changes

* changes

* changes

* changes

* changes

* change

* changes

* change

* Update gradio/layouts.py

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

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-29 19:51:01 -07:00
Dawood Khan
4816e3fb12
Fix: Download button does not respect the filepath returned by the function (#2073)
* download fix

* tweaks

* formatting

* added orig filename

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-29 13:39:15 -07:00
Freddy Boulton
85229a7058
Catch IndexError, KeyError in video_is_playable (#2113) 2022-08-29 12:57:04 -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
Thomas Mello
1ad587834a
Allow frontend method execution on Block.load event (#2108)
* add _js argument to load method

* formatting

* change default type of js arg to None

* change type of js arg to None

* fix test_data js arg type

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-29 07:43:42 -07:00
Abubakar Abid
4f0b8f9829
Accept deprecated file route as well (#2099)
* fix

* added docs

* fixes
2022-08-28 14:40:12 -07:00
Freddy Boulton
6219dc7b0c
Fix infinite request issue (#2070)
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-27 15:06:18 -07:00
Dawood Khan
43c7e8a4a4
Fix TimeSeries examples not properly displayed in UI (#2064)
* fix

* fix

* format

* fixes

* type fixes

* pr fixes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-27 14:45:09 -07:00
Abubakar Abid
f2733d8f94
Fix issues related to demos in Spaces (#2086)
* skip demos in all_demos that don't run

* hack for spaces

* put import back

* added audio debugger demo

* audio fix

* fixed audio debugger

* testing

* test

* remove prints

* fix

* fix

* removed import
2022-08-26 16:35:47 -07:00
Abubakar Abid
adf52d2dad
Label component now accepts file paths to .json files (#2083)
* added label support for file paths

* formatting
2022-08-25 15:26:27 -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
apolinario
a87f20bd54
Encourage people to keep trying when queue full (#2076) 2022-08-24 14:32:30 -07:00
Freddy Boulton
dc437f4161
Hide new demos by default (#2079) 2022-08-24 14:26:31 -04:00
Freddy Boulton
d97fe6e356
Add data science demos to landing page (#2067)
* Add data science demos to landing page

* Shorten titles
2022-08-24 11:09:50 -04:00
Chris Emezue
9c4dc6c183
Add a flagging callback to save json files to a hugging face dataset (#1821)
* work on saving flags in JSON format

* explained what I did more clearly

* final updates + added test case

* reviews to flagging.py for HuggingFaceDatasetJSONSaver

* formatted imports

* used uuid for random ids

* used uuid for random + function to get dataset infos

* reformmated flagging.py

* fix examples test

* formatting

* async examples

* working on mix

* comment out failing test

* fixed interface problem

* final updates to HuggingFaceDatasetJSONSaver flagging.py

* final updates to HuggingFaceDatasetJSONSaver flagging.py

* formatting

* some tweaks

* tweaks

* tweaks

* omar's fixes

* added back test.init

* restored test init

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-23 16:01:37 -07:00
AK391
e63ffb326e
Wandb guide (#1898)
* add wandb guide

* fix code blocks

* update embedding section

* fix code blocks

* update iframe to web components

* add image

* add step 6 and 7 and conclusion

* add embedding code

* fix code block

* use course link

* add blocks usage example

* fix markdown

* moved

* wandb to w&b

change name

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

* Dropdown to dropdown

upper to lowercase

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

* add python to code block

* fix code block

* fix code block indent

* one more fix

* fix formatting issues

* fix number order issue

* fix indentation

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

* remove code from section 3

* remove comment

* use gr integrate and remove extra code blocks

* add back launch

* remove colab panels

* remove the wandb

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

* formatting changes

* fix section 6

* add python to fenced code block

* formatting changes

* fix code block spacing

* code changes

* fix for interface

* tweaks

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-23 15:36:51 -07:00
Abubakar Abid
31c701fbf7
version 3.1.8b (#2063) 2022-08-23 09:10:15 -07: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
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
aliabid94
180ca58a6e
change (#2059) 2022-08-22 15:30:26 -04:00
aliabid94
1510cb73cc
Queue error fix & custom errors (#2047)
* changes

* format

* changes

* changes

* custom error

* change

* change

* change

* changes

* change

* fe fix

* changes

* changes
2022-08-22 11:05:55 -07:00
aliabid94
e9b4584ffb
fix (#2053) 2022-08-22 02:43:36 -07:00
Abubakar Abid
6545c33731
dataset-fixes (#2041)
* dataset-fixes

* remove

* added label parameter to examples
2022-08-19 18:56:48 -05:00
Vilém Zouhar
b6a56b57b3
add support to markdown tables, #1886 (#2037)
* add support to markdown tables, #1886

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-19 18:43:24 -05:00
Ömer Faruk Özdemir
f66c104fc2
Max thread tweaks (#2038)
* max-thread-tweaks

1. move creation of limiter to fastapi endpoint since run_coro_in_background works only in there
2. make max_threads compatible with queue concurrency count

* max-thread-tweaks

1. add warning to run_coro_in_background
2022-08-19 16:28:52 -04:00
Freddy Boulton
a96ed3d205
Hotfix: Fix clear button with queue (#2046)
* Fix clear button with queue

* Fix in config + bump version
2022-08-19 13:28:49 -04:00
aliabid94
029637cef9
Queue maximum length (#2036)
* changes

* format

* changes

* changes
2022-08-18 18:29:51 -04:00
aliabid94
0474e460ad
Fix space embedding w queue [hotfix] (#2035)
* change

* fix

* change

* change

Co-authored-by: Ali <ali.abid@huggingface.co>
2022-08-17 22:02:06 -07:00
Ali Abdalla
247cf2b5a1
Fix loading status on website (#2027)
* fix loading status, remove website skipping

* fixed formatting

* use generated index on landing page

* fix typing

* actually fix typing

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-08-17 20:10:31 -07:00
Abubakar Abid
cd95c60b88
release 3.1.5 (#2033) 2022-08-17 15:35:58 -05:00
Dawood Khan
13915f9c11
[Integration Tests] Update a demo's config.json as part of integration test (#2005)
* add script to create configs for test demos

* no message

* fixes

* fixes

* fix

* test fix

* test fix

* format

* fix
2022-08-17 15:43:26 -04:00
aliabid94
b1dfc9a172
Release new queue beta (#1969)
* queue-refactor-backend (#1489)

* queue-refactor-backend

- create a template for the new design

* queue-refactor-backend

- clean after the old queue

* queue-refactor-backend

- add basic test to websocket endpoint

* queue-refactor-backend

- small fix

* queue-refactor-backend

- debugs&fixes&finalizations
- test the flow with postman

* queue-refactor-backend

- tweaks on websocket closing

* queue-refactor-backend

- cleanup

* queue-refactor-backend

- cleanup & tweaks

* queue-refactor-backend

- cleanup & tweaks

* queue-refactor-backend

- cleanup & tweaks
- correct the exception handling

* queue-refactor-backend

- add websockets dependency

* queue-refactor-backend
- reformat

* queue-refactor-backend
- add single event test

* queue-refactor-backend
- tweaks
- remove outdated tests

* queue-refactor-backend
- reformat

* queue-refactor-backend
- reformat

* queue-refactor-backend
- reformat

* queue-refactor-backend
- add Queue configurations to Blocks.launch()
- add live_queue_update to send estimations whenever a job gets fetched from the Queue

* queue-refactor-backend
- add Queue configurations to Blocks.launch()
- add live_queue_update to send estimations whenever a job gets fetched from the Queue

* queue-refactor-backend
- tweaks

* queue-refactor-backend
- make SLEEP_WHEN_FREE shorter

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

* Add estimation parameters to queue (#1889)

* - tweaks on Estimation

* version

* Revert "version"

This reverts commit bd1f4d7bfe.

* some fix and tweaks

* implement queue frontend (#1950)

* implement queue frontend

* fix types

* fix ws endpoint in build mode

* cleanup

* Queue tweaks (#1909)

* tweaks on estimation payload

* Queue keep ws connections open (#1910)

* 1. keep ws connections open after the event process is completed
2. do not send estimations periodically if live queue updates is open

* fix calculation

* 1. tweaks on event_queue

* fix issue - create new ws for each request

* format

* fix

* fix tests

* fix tests

* tets

* test

* changes

* changes

* changes

* change'

* wtf

* changes

* changes

* file perms

* Release queue beta v1 (#1971)

* - release the new queue

* - bypass the issue in the tests
- rewrite the lost part in the codebase

* - add concurrent queue example (#1978)

* rank_eta calc

* Queue fixes (#1981)

* change

* format

* - comment out queue tests as they dont work well

* - reformat

* Update gradio/event_queue.py

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>

* changes

* changes

* change

* weird fix

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>

* release-queue-v3 (#1988)

* Fix frontend queuing to target secure WSS (#1996)

* change

* format

* changes

* queue-concurrency-tweaks (#2002)

1. make gather_data and broadcast_estimation sequential instead of concurrent because they were deleting elements at the same time and raising expections which was lowering the performance

* Update Queue API, documentation (#2026)

* changes

* changes

* fixes

* changes

* change

* fix

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
2022-08-17 11:17:56 -07:00
Dawood Khan
5fa94e5f4c
Better empty state for the gr.Gallery component (#2021)
* add empty gallery icon

* increase height
2022-08-16 14:12:21 -04:00
Freddy Boulton
75b51808e2
Convert video to playable format if ffmpeg installed (#2003)
* Add implementation + tests

* Add comments'

* Add warning

* Update docs

* Refactor logic

* 3.7 fix attempt

* Fix 3.7 take 2

* Return original video if the conversion fails

* Use ffmprobe + restrict scope of exception

* Fix for windows

* Fix tests
2022-08-16 13:21:13 -04:00
Freddy Boulton
8e24d5d646
Deploy All Demos to Spaces on PRs (#2012)
* Add step to deploy to spaces on release

* Import package not modules

* Lint

* Hacky solution

* Add app file

* Github actions script

* Fix bucket url

* Update versioning

* Fic typo in script

* Change path

* Fix quote

* Clean up action

* Fix keys

* Formatting + comment

* Fix all_demo creation

* lint ui

* Get latest pypi version and use only 20 demos

* Test version change works correctly

* Fix gradio version

* Fix typo

* Use github sha to rebuild on every commit

* Get sha the proper way

* Change where env is accessed

* Fix typo in cp

* Undo changes to version.txt

* Add matrix transpose
2022-08-16 12:07:20 -04:00
Freddy Boulton
21f9da9380
Automatically deploy kitchen sink to spaces on release (#1994)
* Add step to deploy to spaces on release

* Import package not modules

* Lint

* Add comment on slack
2022-08-12 11:51:36 -04:00
Abubakar Abid
a424832ec1
Fix async tests (#2000)
* fix examples test

* formatting

* async examples

* working on mix

* comment out failing test

* fixed interface problem

* fixes
2022-08-11 12:08:06 -07:00
Ömer Faruk Özdemir
4e218fe00f
async-interface-fix (#1845)
* async-interface-fix

- support async in interface with workarounds
- make mix.Parallel async and concurrent

* async-interface-fix

- fix & tweaks

* fix interpretation

* async-interface-fix

- fix mix

* async-interface-fix

- fix tests
- tweaks

* async-interface-fix

- take TODO notes on interface related to refactoring

* async-interface-fix

- fix test_mix

* async-interface-fix

- test create_app

* fix series

* fix series

* reformat

* fix interface test

* - fix tests by moving them async

* - bypass the test

* - bypass the test

* - bypass the test

* - bypass the test without closing it

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-08-10 18:29:14 -04:00
Freddy Boulton
393c1f47d5
Fix invalid wav file error when converting from microphone to file (#1987)
* ;q
:wq

* Add demo

* Add unit test

* Fix test

* Slight refactor

* Lint

* Delete some recordings - import module not method
2022-08-09 16:40:31 -04:00
Freddy Boulton
c49a4264df
Fix local website build (#1980)
* Fix Dockerfiles

* Use local build

* Copy front-end instead of cdn

* frontend

* Fix build
2022-08-09 10:25:03 -04:00
Freddy Boulton
d7c1a9eec4
Prevent Dataframe post-processing from changing dtypes (#1979)
* Fix datetime logic python

* Fix docstring

* Add demo

* Update test
2022-08-08 21:28:07 -04:00
Abubakar Abid
5fe02164f9
Fixes to gr.Examples (#1952)
* still working

* remove exampleset logic

* wip

* added tests and fix

* fixed header issue

* more tests

* formatting

* removed print

* Update gradio/examples.py

* used context managers

* more readable

* removed unnecessary start index

* formatting
2022-08-08 10:35:26 -07:00
Abubakar Abid
0cdb9b564c
Fix screenshot gif (#1966)
* fix screenshot

* fix gif
2022-08-08 09:52:21 -07:00
Ali Abdalla
1ba956af74
remove broken audio demo (#1963) 2022-08-05 20:22:45 -07: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
Ali Abdalla
359a62b255
fix add-copy js (#1959) 2022-08-05 13:15:28 -07:00
Abubakar Abid
eae445e340
3.1.4 release (#1956)
* version

* 3.1.4b

* release 3.1.4
2022-08-05 11:30:19 -07:00
Abubakar Abid
b271890c72
Release 3.1.4b (#1955)
* version

* 3.1.4b
2022-08-05 09:53:06 -07:00
Abubakar Abid
f46e95d7e0
Fixes to TabbedInterface (#1951)
* tabbed

* formatting

* fixed test

* fixed based on review
2022-08-04 18:46:15 -07:00
Ali Abdalla
d4272b3fdb
Better navigation and search in docs (#1884)
* expand nav bar to include subclasses and methods

* only show sub-links during the section

* add search

* add hotkeys

* override default shortcuts

* styling

* added x button

* broken style block

* refactoring and fixing errors

* esc key shortcut for exit

* svg file instead of b64

* using @apply
2022-08-04 18:23:20 -07:00