Commit Graph

4394 Commits

Author SHA1 Message Date
Dawood Khan
83b2953c69
Quick Fix: Multiple file download not working (#2169)
* fix

* fix

* fixes

* format

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-09-07 17:44:50 -04:00
Freddy Boulton
a69fd1de13
Preserve Labels In Interpretation Components (#2166)
* Add label to interpretation

* Add defaults

* Fix default for slider
2022-09-07 14:43:08 -04:00
aliabid94
5360ea002e
changes (#2193) 2022-09-06 14:34:56 -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
3464673064
Add manual trigger to deploy to pypi (#2192)
* Create test.yml

* Update deploy-pypi.yml

* Update deploy-pypi.yml

* Delete test.yml

* fixes

* fixes

* check pypi

* check pypi

* version

* version
2022-09-06 13:49:49 -07:00
Freddy Boulton
9b4bf627f2
Add orig_name to serialized file repr (#2145) 2022-09-06 10:40:59 -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
cobryan05
b145a2a191
Keep embedded PngInfo metadata (#2170)
* Keep embedded PngInfo metadata

Maintain any text-only PngInfo metadata on a PIL image when
dragging UI images between components.

* Minor cleanup
2022-09-04 18:54:30 -07:00
Hoàng Tùng Lâm (Linus)
66ef85b874
Fixed misleading log when server_name is '0.0.0.0' (#2176)
* Fixed misleading log when server_name is '0.0.0.0'

* some cleanups

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-09-04 18:48:08 -07:00
Dawood Khan
090622c2cc
fix (#2168) 2022-09-02 16:18:52 -04:00
Abubakar Abid
7bda7eedd1
Fixed Named API Requests (#2151)
* fixed duplicate api_name issue

* fixed name

* formatting

* fixed errors

* more complex test

* formatting
2022-09-02 04:10:20 -07:00
Abubakar Abid
4e1ee4099f
3.2 release! (#2139)
* 3.2

* ip address test catch

* treat 3.x interfaces as interfaces

* formatting

* mode
2022-08-31 13:49:06 -07:00
aliabid94
b2a181d4b0
Show error on Connection drops (#2094)
* changes

* changes

* fix

* changes

* fix
2022-08-31 13:16:43 -07:00
Freddy Boulton
880c63e200
Better processing of example data prior to creating dataset component (#2128)
* WIP commit

* Add method to components

* Validate image filepath

* Remove unused imports

* Fix validation

* Only display name for model3D

* Remove image validation

* Don't use abstractmethod - add tests

* Remove unused import

* Remove breakpoint
2022-08-31 12:46:43 -07:00
aliabid94
f2ab162b5d
changes (#2147) 2022-08-31 12:34:54 -07:00
pngwn
fa65d330c1
safari fixes (#2138) 2022-08-31 10:56:18 -07:00
aliabid94
c4495a0a5e
fix (#2133) 2022-08-30 18:12:22 -07:00
Abubakar Abid
df25d633fe
Some enhancements to gr.Examples (#2131)
* added elem_id

* formatting

* click
2022-08-30 18:06:36 -07:00
Ron Au
78d94cff1d
feat(samples table/gallery): Crop thumbs to square (#2109) 2022-08-30 17:40:18 -07:00
pngwn
609021b15b
2092 df ex (#2125)
* improve preview of dataframe examples

* support tsv dataframe examples

* parse only [artial file + fix light mode]

* color-tweak
2022-08-30 21:56:59 +01:00
Abubakar Abid
e5fd99c79b
Update CONTRIBUTING.md (#2118)
* Update CONTRIBUTING.md

* Update helpers.sh
2022-08-30 07:42:44 -07:00
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