Commit Graph

440 Commits

Author SHA1 Message Date
Abubakar Abid
06bfb6b218
Updated atomicwrites version (#1742)
* commented out test

* updated atomicwrites

* undo commenting out
2022-07-08 18:11:29 -05:00
aliabid94
70ebf698fa
Live website changes (#1578)
* fix audio output cache (#804)

* fix audio output cache

* changes

* version update

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

* Website Tracker Slackbot (#797)

* added commands to reload script

* catch errors with git pull

* read new webhook from os variable

* correcting bash

* bash fixes

* formatting

* more robust error checking

* only sends success if git changes

* catching error from script

* escaping error text to send with curl

* correct text escaping for error message

* fix search bug in guides (#809)

* Update getting_started.md (#808)

* Fix type of server returned by `Launchable` (#810)

* `Launchable` returns a FastAPI now

* Update .gitignore

* Add a missing line to getting started (#816)



Former-commit-id: 81e271ca22 [formerly 96f203108b]
Former-commit-id: eaff13262853078e0c6c0baa54c731d9e56bc73f

* Add a missing line to getting started (#816)



Former-commit-id: 81e271ca22 [formerly 81e271ca22 [formerly 96f203108b]]
Former-commit-id: eaff13262853078e0c6c0baa54c731d9e56bc73f
Former-commit-id: b5112c3f42

* Add a missing line to getting started (#816)



Former-commit-id: 81e271ca22 [formerly 81e271ca22 [formerly 81e271ca22 [formerly 96f203108b]]]
Former-commit-id: eaff13262853078e0c6c0baa54c731d9e56bc73f
Former-commit-id: b5112c3f42
Former-commit-id: bce6f9c4c5

* Add a missing line to getting started (#816)



Former-commit-id: 81e271ca22 [formerly 81e271ca22 [formerly 81e271ca22 [formerly 81e271ca22 [formerly 96f203108b]]]]
Former-commit-id: eaff13262853078e0c6c0baa54c731d9e56bc73f
Former-commit-id: b5112c3f42
Former-commit-id: bce6f9c4c5
Former-commit-id: feba0888e3

* Add a missing line to getting started (#816)

* Clean-History
- Remove 51MB file with this commit


Former-commit-id: 34b6a2325d613eeef622410f2d1ff3d869d3133c

* Clean-History
- Remove 51MB file with this commit


Former-commit-id: 34b6a2325d613eeef622410f2d1ff3d869d3133c
Former-commit-id: dd700c33cc

* Clean-History
- Remove 51MB file with this commit


Former-commit-id: 34b6a2325d613eeef622410f2d1ff3d869d3133c
Former-commit-id: dd700c33cc
Former-commit-id: 0d80e6a056

* Clean-History
- Remove 51MB file with this commit


Former-commit-id: 34b6a2325d613eeef622410f2d1ff3d869d3133c
Former-commit-id: dd700c33cc
Former-commit-id: 0d80e6a056
Former-commit-id: 20523b0519

* changes

* changes

* Homepage: header image size (#1347)

* image size

* image in local assets

* add dall-e mini banner

* undo ui changes

* changes

* changes

* updates

* updates

* changes

* changes

* changes

* h11 dependency

* add npm build-mac

* expand demo button to all classes

* add demos to docstrings

* add anchor tags to headers

* add required tag to param table

* add consistent styling for headers

* skip param beginning with underscore from docs

* skip kwargs param from docs

* remove types in param docstring

* override signature to reflect usage

* add supported events

* add step-by-step guides

* fix guide contribution link

* add related spaces

* fix img styling on guides

* pin quickstart, advanced, and block guides to top

* margin fix

* autogenerated copy buttons for all codeblocks

* changes

* documentaiton

* format

* launch

* formatting

* style changes

* remove backticks

* changes

* changes

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: Julien Chaumond <julien@huggingface.co>
Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
Co-authored-by: Ali <ali.abid@huggingface.co>
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-07-06 16:22:10 -07: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
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
pngwn
92889b7b93
1220 mirror webcam (#1686)
* support webcam mirroring for images

* flip video in preprocessor

* finalise webcam mirroring

* address review comments

* fix formatting

* improve video UI

* fix tests

* fix tests again
2022-07-05 17:30:02 +01:00
Luigi Cerone
8f89270f50
Color picker (#1695)
* Add new colorpicker component skeleton

* Updated colorpicker skeleton with some functionalities

* - Fix default input color

- Change input style

* Add colorpicker demo

* Add tests and code format

Co-authored-by: mfumanelli <fumanellimartina@gmail.com>
2022-07-05 08:50:17 +03:00
Abubakar Abid
68afe67497
test hotfix (#1705)
* test hotfix

* init
2022-07-04 15:29:19 -07:00
Ömer Faruk Özdemir
e5fd0edce1
fix tunneling test (#1694)
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-07-04 17:04:44 +03:00
pngwn
609de11ce8
add markdown and html support to dataframe (#1684)
* add markdown and html support to dataframe

* fix bug, address review comments

* fix test

* fix test

* rename parser instance variable
2022-07-04 10:27:48 +01: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
pngwn
a2b84199d8
detect all types of null default value (#1685)
* detect all types of null default value

* fix test

* address review comments
2022-07-01 19:23:02 +01:00
Freddy Boulton
d01da6e205
Fix postprocess in Audio (#1667) 2022-06-30 09:46:50 -04: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
Halil Ibrahim Bestil
3026b8f597
Add type hint to provide autocompletion for Request class instances. (#1642) 2022-06-26 17:10:02 +03:00
Halil Ibrahim Bestil
51c8c34486
Async Request Class (#1595)
* Implement Request class and its tests.

* Add new requirements

* Reformat codebase.

* Fix formatting.

* Add library level requirements.

* Convert validated_data property to get_validated_data function.

* Fix the client fixture.

* Update test/test_utils.py

* Update test/test_utils.py

* Fix the client fixture.

* Add missing initialization for Request._validated_data

* Fix async test problem with test_tunneling.py

* Update gradio/utils.py

* Update gradio/utils.py

* Fix formatting.

Co-authored-by: Ömer Faruk Özdemir <farukozderim@gmail.com>
2022-06-23 20:44:04 +03:00
Abubakar Abid
7a0f6b1dd2
Deprecation error if multiple functions are passed into fn parameter in Interface (#1623)
* stack deprection

* formatting

* rewrite parallel

* formatting'
2022-06-22 23:48:42 -07:00
pngwn
8710d3a079
Wrap dataframe (#1571)
* add suport for table cell wrapping

* revert pkginfo change

* revert pkginfo change

* fixed tests

* formatting

* type hint

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-16 17:02:01 -07: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
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
Abubakar Abid
71bcfdbe92
Callable blocks (#1437)
* format backend

* blocks callable

* call blocks

* format

* fixed upload

* fix mix

* formatting

* formatting

* formatting

* added serialization/deserialization for video

* formatting

* blocks

* formatting

* fix tests

* formatting
2022-06-02 15:37:25 -07:00
Dawood Khan
7b9cba0e9e
File Cached Examples Fix (#1334)
* fix file cache examples issue

* format

* fix for tests

* format fix

* fix multiple files input

* format

* format

* fix preprocess example

* fix multiple file output

* remove single_file const

* fix tests + format

* renamed demo

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-01 12:23:12 -04: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
7248f1359b
Hotfixes for plot (#1355)
* fixed plot and added tests

* 3.0.4

* formatting

* fixed tests
2022-05-22 13:54:04 -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
13afd4c967
Fix default cleared value (#1300)
* changes

* changes

* chagnes

* fixed test

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-16 14:43:37 -07:00
aliabid94
2a93225952
Create Streamables (#1279)
* changes

* fix

* fix for vars too

* changes

* fix tests

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-16 11:51:09 -07:00
Abubakar Abid
ee52811997
Label hotfixes (#1281)
* label default

* label test fix

* formatting
2022-05-16 09:44:32 -07:00
aliabid94
569a16998d
fix slider (#1268) 2022-05-15 23:55:35 -07:00
Radamés Ajna
73e98ddf15
Small fixes for multiple demos compatible with 3.0 (#1257)
* add required param but None

* import torch req, add chunk_length_s

import torch requirement for transformers
enable inference for longer audio files

* fix compononte initialization

* input number is float, force int to multipy string

* no need for Templates, fix class init

* expects array

* add requirements.txt for demo

* update with cleaner syntax

* add sample csv to fraud demo

* adapt to new syntax

* temp fix for Slider arguments

* add dep to requirements

* remove gr.Markdown from Interface init

* fix default value param name

* upgrade deepspeech, download models onstart

* use path resolution consistent with other demos

* remove redundant demo

* add example to interface

* fixed plotting issues

* plots

* deprecated carousel

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-13 22:45:44 -07:00
Abubakar Abid
63d0a28c08
Website Design Changes (#1015)
* adding gallery

* added netlify files

* new navbar design

* header section new design

* used by section new design

* cards section new design

* integrates with section new design

* customer stories section new design

* footer and gradient

* demos section new design

* docs fixes

* docs reorg

* docs reorg

* upgrading to tailwind 3

* tailwind config changes

* navbar new design

* fixing body on all pages

* Updating Guides  (#1012)

* updating getting started

* updated codecov version

* tweaks to gs

* added netlify file

* added netlify file

* website prebuild script

* increased code size

* blocks

* edits

* blocks_hello

* hello world

* guide

* merge main

* added flipper demo

* guide

* guide

* add guides

* tweak to refresh website

* header section new design

* demos section new design

* cards design

* used by section

* tweets section

* footer on all pages

* mobile responsive fixes

* mobile responsive fixes

* https fonts

* completed blocks guide

* unify components

* minor tweaks

* docs headers styling and navigation pane

* parameter code blocks

* styling description and input type

* parameter tables and other styling

* only documenting interactive components when possible

* guides

* embedding not working

* demos not working

* fixing demo code

* fixing demos

* demo fix

* updated demos

* updated demos

* ui update

* updated docstrings

* updated code snippets so they run

* updating docs

* Interface docs

* updating interface

* fixing parameters in interface.py

* required and defaults for interface, and styling

* fixing up interface (#1207)

* fixing up interface

* fixed interface methods

* formatting

* updating interface docs

* updating interface docs

* formatting

* docstring to load from docstrings

* fixed colors

* finalize interface content

* interface examples

* fixed examples

* added some blocks docs

* blocks

* component fixes

* reorganized some files (#1210)

* formatting

* added info for every component

* fixes

* blocks docs

* added blocks demos

* adding combined interfaces

* added parallel, series

* Doc: layout update (#1216)

* doc layout

* home spacing

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

* adding layouts

* layouts done

* added events for components

* formatting and https

* brings back dropdown and other components

* fix header ids

* moved ids and fixed nav

* added parameters for remaining component

* docstring fixes

* landing page demos

* demo window placeholder

* demo nav

* fixed test

* formatting

* demo code

* correctly importing gradio  css/js

* remove keyvalues

* modify launch script to move gradio assetS

* components embedded test

* correct demo name

* hide try demo and embedding

* local devserver changes

* create embedding json with configs

* changes

* fixes

* comment out layout docs

* demo work

* demo fixes

* demo embedding fixes

* typo

* jinja fix

* demo nav fix

* hide demo button

* formatting

* removed whitespace

* remove newline from parameter

* reverting comments

Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-05-13 19:48:46 -07:00
Freddy Boulton
8d5e05cdbe
Add precision to Number, backend only (#1125)
* integer type

* Add integer parameter for Number

* Pass down integer prop to Number instead:

* Format + update test

* Update interpretation neighbors code + docstrings

* Rename prop to type as opposed to integer

* Update error message + test

* Update docstring

* Implement precision

* Add test + format

* Add test for precision=2

* Change round logic for precision=0

* integer type

* Add integer parameter for Number

* Pass down integer prop to Number instead:

* Format + update test

* Rename prop to type as opposed to integer

* Implement precision

* Add test + format

* Address docstrings

* Fix test + rebase
2022-05-13 19:04:11 -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
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
aliabid94
c50a2b021a
Sharing fix for assets (#1208)
* changes

* format

* typo

* updated PyPi version to 2.9b33

* Update PKG-INFO

* removed

* formatting

* fixes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-11 16:27:58 -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
871c9713b4
Restored /api/predict/ endpoint for Interfaces (#1199)
* updated PyPi version to 2.9b25

* added /api/predict reverse compatibility

* fixed flagging

* formatting

* fixed networking tests

* added queue false
2022-05-09 18:05:30 -07:00
pngwn
94ab75dbec
962 dataframe (#1186)
* refresh dataframe

* add fixed rows + cols to dataframe

* tweaks

* validate dataframe headers + col_count

* cleanup

* cleanup

* make linter happy

* fix test

* fix test again

* fix test definitely this time

* implement file drop support for dataframe

* remove leftover files

* tweaks

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-05-08 21:55:02 -07:00
Abubakar Abid
4bd609bcc0
A few small fixes (#1171)
* allow markdown to be set dynamically

* moved markdown to output section

* added aliases for component names

* added aliases

* fixed optional

* formatting

* tests

* tests

* tests
2022-05-06 00:29:02 -07:00
pngwn
eca95a549d
Timeseries improvements (#1149)
* ensure chart works with decimal values + generatesaxis lines for values below 10

* add negative example

* use color palette for chart

* add colors kwarg to Timeseries

* fix test?
2022-05-03 14:05:17 -07:00
aliabid94
b0306e716d
Restore queue in Blocks (#1137)
* first commit

* format

* fix tests

Co-authored-by: Ali Abid <aliabid94@gmail.com>
2022-05-02 16:17:53 -07:00
Abubakar Abid
8ad401ba33
Blocks rendering fix (#1102)
* 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

* merged

* unrender

* add article

* formatting

* fixed render()

* added demo

* formatting

* merge main

* formatting

* cleanups
2022-04-28 01:51:54 -07:00
Ömer Faruk Özdemir
930c4a3fa6
clean-deprecated-parameters (#1090)
* clean-deprecated-parameters

- resolve conflicts

* clean-deprecated-parameters

- fix tests

* clean-deprecated-parameters

- fix tests

* clean-deprecated-parameters

- resolve conflicts

* clean-deprecated-parameters

- refactor blocks.py

* clean-deprecated-parameters

- remove capture_session support

* clean-deprecated-parameters

- fix get_component_instance

* clean-deprecated-parameters

- fix tests

* clean-deprecated-parameters

- reformat

* clean-deprecated-parameters

- fix tests

* clean-deprecated-parameters

- fix tests

* clean-deprecated-parameters

- resolve conflicts

* clean-deprecated-parameters

- resolve conflicts

* Update gradio/deprecation.py

* Update gradio/deprecation.py

* Update gradio/deprecation.py

* removed some incorrect kwargs

* formatting

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-04-28 01:12:40 -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
Abubakar Abid
82e95e259c
Flagging fixes (#1081)
* only show flagging button if manual

* fixing flagging

* fixed flagging examples issue

* formatting

* cleanup

* fixed tests

* predictbody

* formatting

* fixed tests
2022-04-27 00:32:57 -07:00
Ömer Faruk Özdemir
72df62daea
remove-queue-from-events (#1056)
* remove-queue-from-events
- enable_queue exists just under Blocks.launch()

* remove-queue-from-events
- enable_queue exists just under Blocks.launch()

* remove-queue-from-events
- fix tests

* spaces-defaults (#1057)

* spaces-defaults
- enable_queue and cache_examples are activated in spaces in default option

* spaces-defaults
- tweaks
2022-04-26 00:35:47 +03:00