Commit Graph

682 Commits

Author SHA1 Message Date
Kashif Rasul
d79039beb1
Latex support (#2696)
* initial use of dollarmath plugin

* add frontend support

* chnages

* changes

* changes

* changes

* changes

* fix

* added latex to kinematics blocks

* changes

* Update CHANGELOG.md

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

* added example to changelog

* remove param

* doc fix

* fixes

* latex noteboox fix

* fix

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-29 11:26:17 -08:00
Ali Abdalla
67275ec1d6
Add open in colab buttons to demos in docs and /demos (#2608)
* add generate_notebooks and run it

* add buttons to demos tab

* add buttons to docs

* add github check

* fix erros

* Update run.py

* Update run.py

* fix github action

* add nbformat

* wget files from demo directory

* testing with regex

* typo in github action

* cd first

* correct notebooks

* remove prit

* testing

* regenerate ids in notebooks

* testing action

* testing action

* testing action

* sort files before wget so no git diff

* skip DS store and others as sub files

* example demo change without notebook change

* fixes

* example demo change without notebook change

* example regenerated notebooks

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update .github/workflows/check-demo-notebooks.yml

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

* gh action comments

* gh action syntax

* gh action syntax fixes

* test demo change without generating notebooks

* ran the suggested command

* remove unnecessary script

* add notebook for upload button demo

* switch to pull_request_target

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-22 16:56:46 -08:00
Dawood Khan
b5f22671a2
Add Upload Button (#2591)
* add upload button

* upload button

* changelog

* Update CHANGELOG.md

* format

* update file component

* upload button fixes

* label

* remove fileupload changes

* remove file component changes

* restore lock file

* pnpm lock file

* Update CHANGELOG.md

* fixes

* fixes

* more fixes

* fix tests

* fixes

* lockfile

* fix test

* Update gradio/components.py

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-21 13:34:31 -05:00
Abubakar Abid
5e148c3752
Adding ability to access in Fastapi request object into your function (#2641)
* fastapi requests

* formatting

* implement

* fix

* formatting

* formatting

* changelog

* added demo

* remove print

* added to guide

* changes for queuing

* changes to gr.Request

* formatting

* formatting

* fixes

* lint

* fixed tests

* fix batching

* fixing tests

* cleanup

* lint

* added tests; fixed review

* improve docs
2022-11-19 00:52:06 -08:00
Freddy Boulton
8d59c1480e
More demo fixes (#2656)
* Minor tweaks

* Fix gr outputs

* Fix changelog
2022-11-16 15:42:24 -05:00
pngwn
4b57984ead
add password and email textbox types (#2653)
* add password and email textbox types

* changelog + fix tests

* formatting

* fix tests maybe

* fix tests

* add more tests

* whatever

* weird thing
2022-11-15 22:23:47 +01:00
Freddy Boulton
a8f961ec7e
Fix demos (#2648) 2022-11-15 10:04:01 -05:00
Freddy Boulton
9ec45f64b9
Move map to demos page (#2627) 2022-11-09 09:26:36 -05:00
Ali Abdalla
a80084f3df
Dropdown for seeing docs as latest or main (#2544)
* support docs for pip and git

* upload spaces with gradio wheel

* aws

* upload wheel to aws

* fix error in docker compose

* fix dockerfile

* fix dockerfile

* fix upload demos

* fix upload demos

* styling

* fake change

* remove check_version

* fixes

* fix buttons

* fix navigation on main

* add github action

* build version docs in docker

* fix path and docker errors

* add requests

* fix command

* more docker fixes

* more docker fixes

* no prerelease

* fix restart demos

* undo fake changes, and fix build_version

* fix variable

* fix mistake

* add how to build from main

* new line to requirements

* fix instructions

* Update CHANGELOG.md

* duplicate line in Dockerfile

* switch to github actions, use separate pages

* fix issues in github action

* fix path for github action

* more fixes

* more fixes

* fix github action

* add template

* fix demos template

* update release notes for 3.9

* add -A

* refactor

* keep old version htmls

* unpin gradio version in requirements

* Update website/homepage/src/docs/template.html

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

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-11-08 13:02:05 +01:00
Freddy Boulton
f795a4d3b1
Use read_sql in database guide (#2604)
* Move demo to gradio + fix code

* Foo

* Address comments
2022-11-04 16:31:08 -04:00
Freddy Boulton
a6e72f7814
Fix some spaces that were not building (#2596)
* Add requirements

* Delete unused demo

* Remove some spaces from download

* explain reasoning
2022-11-02 17:47:53 -04: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
Freddy Boulton
fa08e711fa
Add live dashboard demo (#2573)
* Add live dashboard demo

* Remove markdown syntax

* Dont use global

* Undo change
2022-11-02 12:48:26 -04:00
Dawood Khan
3f9cf301ed
Fixing links in plotly map guide + demo (#2578)
* move demo to gradio org

* Update CHANGELOG.md

* Update CHANGELOG.md
2022-11-01 18:18:08 -04:00
Freddy Boulton
a23eb53e3b
Run events every given number of seconds (#2512)
* WIP

* Fix implementation

* Fix units

* Rename

* Delete dead code

* This works

* Fix tests

* Final fix - still rough

* Reduce code duplication

* Fixing bugs + test

* Changelog

* Add gif to changelog

* Update demo and remove unused imports

* undo accidental diff

* Linting

* Add to guides

* Address comments

* formatting changelog

* Fix warnings
2022-10-28 17:53:06 -04:00
aliabid94
10552cb6fd
Allow user to send inputs as dictionary (#2550)
* change

* changes

* changes

* changes

* changes

* change

* changes

* changes

* changes

* changes

* changes

* format

* changes
2022-10-28 10:52:28 -07:00
Freddy Boulton
943cdd5f35
Add dashboard demo to Demos tab (#2508)
* Add demo

* Changelog

* Undo

* Fix formatting
2022-10-25 11:15:18 -04:00
Abubakar Abid
d7c96e1ad8
Adds a demo to show how a sound alert can be played when a prediction is complete (#2478)
* add sound alert demo

* changelog

* update changelog

* address suggestions
2022-10-18 13:03:07 -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
Ali Abdalla
bff43bfb65
Upload all demos to spaces (#2281)
* upload all demos in the repo to spaces

* remove upload_demos from recipes, fix error

* load docs and guides demos from spaces

* Remove old demos dir, container, nginx and docker-compose

* update landing page spaces through /demo

* fix run filenames

* skip demos without a run.py file

* fix embedding in guides and docs

* update only on version change

* fix restart script

* fix broken demos

* add component demos

* website tracking pip

* fix embedded components

* fix components

* fix extra slash

* remove footers correctly

* Update CHANGELOG.md

* fix race condition

* add inner_template to gitignore

* set runfile to run.py

* fix time.sleep after testing

* check for prereleases
2022-10-14 14:07:26 -07:00
pngwn
78ab2c8e67
fix interactivity of value-less components with no dependencies (#2459)
* fix interactivity of value-less components with no dependencies

* changelog

* changelog fix

* changelog fix

* changelog fix

* formatting
2022-10-14 17:12:42 +01:00
Dawood Khan
1d18ddae66
Add blur event to textbox and number (#2448)
* add blur event to textbox and number

* changelog

* fixes

* fix blur for number

* reformat
2022-10-12 23:53:05 -04:00
pngwn
ed4f3e4ffd
add snapshot testing (#2438)
* add snapshot testing

* bump ci image

* tweak

* tweak

* fix gitgignore

* fix gitgignore

* dedicated snapshot script

* clean up tests

* tweaks

* fix ci

* fix script

* oops

* fix
2022-10-12 17:30:42 +01:00
Dawood Khan
3a2de9b415
Map demo + Guide (#2402)
* map demo + guide

* fixes

* update dataset to load from hub

* remove csv file

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-11 23:51:48 -04:00
aliabid94
ac378d0875
Stream works now (#2351)
* changes

* changes

* lazy load streaming deps

* lazy load streaming deps

* cleanup

* fix last chunks of streaming

* add changelog

* add changelog

* add changelog

* add changelog

* updated streaming demo

* renamed sst

* changes

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-05 14:11:47 -07:00
aliabid94
1f5efa7efa
Reworking layout styling (#2291)
* changes

* changes

* changes

* changes

* changes

* changes

* version

* changes

* formatting

* version

* remove group hack

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* test

* changes

* changes

* changes

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-10-03 18:01:41 -05:00
Freddy Boulton
40febc3584
Make image_classifier_interface_load runnable (#2365) 2022-09-29 14:47:40 -04:00
Dawood Khan
55e6f40f80
Typeable value on gradio.Slider (#2329)
* typeable number slider

* fix hardcoded files in test configs

* test

* test fix
2022-09-26 23:00:02 -04:00
aliabid94
a05f32c8f1
Add captions to galleries (#2284)
* changes

* fix demo

* change

* changes

* test

* testing demo

* testing demo

* testing demo

* changes

* change

* changes

* merge

* changes

* fix

* changes

* changes

* changes

* Update gradio/components.py

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

* Update gradio/components.py

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

* Update gradio/components.py

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

* chnages

* changes

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-09-26 19:56:16 -07:00
Freddy Boulton
9f7dd05b72
Start queue when gradio is a sub application (#2319)
* First stab at it

* Use util methos

* lint

* Test

* Fix formatting

* Try out setting predict endpoint from websocket request

* lint

* Fix bug

* Address comments - remove server and port

* Skip in 3.7

* Fix documentation

* Add default 🤦

* docs tweak

* Add back imports that were deleted by wrong linter version

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-09-23 16:01:44 -04:00
Abubakar Abid
cecaf1a635
Sketching + Inpainting Capabilities to Gradio (#2144)
* templates

* working on backend

* formatting

* Sketching fe (#2184)

* fix scaling on sketch + bg img

* tweaks

* ketch updates

* cursor style

* sketchpad

* fixes

* ensure background is white for bw sketch

* fix everything

* re-enable demos

* updated demo and changed from dict to str

* beta release

* fix bugs, tweak webcam source

* re-anable demos

* fix clear button and tab changing

* maybe fix test

* maybe fix test again maybe

* various fixes

* fix img uplaod + color sketch

* remove lazy brush but keep smoothing

* fix sketch bg

Co-authored-by: pngwn <hello@pngwn.io>
2022-09-23 13:14:56 +02:00
Freddy Boulton
b8fc551807
Raise warning when trying to cache examples but not all inputs have examples (#2279)
* Add error message + test

* Undo changes to fake_gan

* Raise warning message instead

* Fix typo in warning message

* Remove unused import

* Address comments
2022-09-20 10:48:52 -04:00
Abubakar Abid
6c33eed976
Promotes postprocess and preprocess to documented parameters (#2293)
* changes

* Delete media_data.py.isorted

* fixes in other files

* fixes in other files

* added for grid

* removed status tracker

* removed status tracker

* added deprecation warning

* formatting
2022-09-19 19:38:17 -05:00
Dawood Khan
42a9c2688f
Fix Multiple File Examples (#2267)
* fix multiple file examples

* format

* fix

* change demo name zip_files

* change func names
2022-09-15 14:40:59 -04:00
Ali Abdalla
597337dcb8
Adding a Playground Tab to the Website (#1860)
* added playground with 12 demos

* change name to recipes, restyle navbar

* add explanatory text to page

* fix demo mapping

* categorize demos, clean up design

* styling

* cateogry naming and emojis

* refactor and add text demos

* add view code button

* remove opening slash in embed

* styling

* add image demos

* adding plot demos

* remove see code button

* removed submodules

* changes

* add audio models

* remove fun section

* remove tests in image semgentation demo repo

* requested changes

* add outbreak_forecast

* fix broken demos

* remove images and models, add new demos

* remove readmes, change to run.py, add description as comment

* move to /demos folder, clean up dict

* add upload_to_spaces script

* fix script, clean repos, and add to docker file

* fix python versioning issue

* env variable

* fix

* env fixes

* spaces instead of tabs

* revert to original networking.py

* fix rate limiting in asr and autocomplete

* change name to demos

* clean up navbar

* move url and description, remove code comments

* add tabs to demos

* remove margins and footer from embedded demo

* font consistency

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-09-15 08:24:10 -07:00
Freddy Boulton
f346118133
Show view api button even if there are no named api routes in the app (#2250)
* Show message when no named api routes

* Lint

* Change text slightly

* Add show_api to launch method + fix text

* Undo changes to demos

* Change url example
2022-09-15 11:11:31 -04:00
Abubakar Abid
1beb54a8c0
Add documentation about how to create and use the Gradio FastAPI app (#2263)
* added a demo

* added in docs
2022-09-14 14:23:12 -07:00
Abubakar Abid
809230f25f
Added support for URLs for Video, Audio, and Image (#2256)
* added url support

* avoid copying temp file

* formatting

* remove unused import

* fixes

* updated example

* fix
2022-09-13 17:24:50 -07:00
Abubakar Abid
bf1510165d
Support for iterative outputs (#2189)
* Support for iterative outputs (#2162) (#2188)

* added generator demo

* fixed demo structure

* fixes

* fix failing tests due to refactor

* test components

* adding generators

* fixes

* iterative

* formatting

* add all

* added demo

* demo

* formatting

* fixed frontend

* 3.2.1b release

* removed test queue

* iterative

* formatting

* formatting

* Support for iterative outputs (#2149)

* added generator demo

* fixed demo structure

* fixes

* fix failing tests due to refactor

* test components

* adding generators

* fixes

* iterative

* formatting

* add all

* added demo

* demo

* formatting

* fixed frontend

* 3.2.1b release

* iterative

* formatting

* formatting

* reverted queue everywhere

* added queue to demos

* added fake diffusion with gif

* add to demos

* more complex counter

* fixes

* image gif

* fixes

* version

* merged

* added support for state

* formatting

* generating animation

* fix

* tests, iterator

* tests

* formatting

* tests for queuing

* version

* generating orange border animation

* testings

* added to documentation

Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-09-08 07:35:31 -07:00
aliabid94
f8523868d0
Add accordion component (#2208)
* changes

* changes
2022-09-07 20:32:10 -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
Freddy Boulton
9b4bf627f2
Add orig_name to serialized file repr (#2145) 2022-09-06 10:40:59 -04:00
aliabid94
b2a181d4b0
Show error on Connection drops (#2094)
* changes

* changes

* fix

* changes

* fix
2022-08-31 13:16:43 -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
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
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
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
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
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
Ö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
aliabid94
029637cef9
Queue maximum length (#2036)
* changes

* format

* changes

* changes
2022-08-18 18:29:51 -04: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
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
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
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
0cdb9b564c
Fix screenshot gif (#1966)
* fix screenshot

* fix gif
2022-08-08 09:52:21 -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
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
pngwn
3a58dd1924
default to a single table row (#1936) 2022-08-02 22:02:49 -07:00
Freddy Boulton
db1ff439a7
Fix docs (#1908)
* Fix docs

* Fix ner demo

* refactoring script templates

* remove linksnav in guides

Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2022-07-29 16:21:05 -04:00
Ali Abid
0e4931fbe2 changes 2022-07-26 15:11:08 -04:00
Abubakar Abid
0019c12844
added multistep to docs (#1880) 2022-07-25 17:00:13 -07:00
Martina Fumanelli
ba65a95e07
Add new component guide (#1861)
* Add first steps to new component guide

* Add last steps to new component guide

* Fix review minors on new component guide

* Fix first steps to new component guide

* Fix last steps to new component guide

* Fix color_picker demo examples

* Add code snippets to new component guide

* Apply suggestions from code review to new component guide

Co-authored-by: pngwn <hello@pngwn.io>

* Add explanation for different types of component files in new component guide

Co-authored-by: Luigi Cerone <luigicerone96@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
2022-07-25 16:25:50 -04:00
Abubakar Abid
c9b8ad80fd
NER Improvements and Guide (#1869)
* ner accept hf format

* formatting

* added ner guide

* guide fixes

* added unittests for highlighttext

* formatting
2022-07-25 12:16:00 -07:00
Dawood Khan
cd0d520696
Plot Component Integration Test (#1859)
* plot integration tests

* format

* remove files
2022-07-25 12:48:59 -04:00
Ali Abid
21f80d77df changes 2022-07-25 08:45:13 +01:00
Ali Abid
7a486d77f6 changes 2022-07-25 04:46:11 +01:00
Ali Abid
3a93202fd6 changes 2022-07-25 02:18:42 +01:00
曾逸夫(Zeng Yifu)
026e6cab55
Create run.py (#1872) 2022-07-23 17:22:54 -07:00
Dawood Khan
babbb7eb41
Add new i18n tokens (#1751)
* add new i18n tokens

* fixes

* fixes

* format
2022-07-22 21:32:55 +01:00
Abubakar Abid
c638aa9961
Improve flagging guide & add flagging with Blocks (#1853)
* improving guide

* flagging guide

* remove img

* fixed spaces

* fixes
2022-07-22 12:14:34 -07:00
Freddy Boulton
9360670e23
Add guide on how to add interpretation to a Blocks App (#1851)
* Add demo code

* Guide rough draft

* Update demo

* Add image classification demo
2022-07-22 12:00:24 -04:00
Freddy Boulton
c579aa195d
Clarify API of custom interpretation function + fix demo (#1842)
* Modify demo + guide on custom interpretation

* Fix typo

* Change interfaces to inputs
2022-07-21 09:42:49 -04:00
Abubakar Abid
493cf7c069
fix (#1837) 2022-07-20 06:39:47 -07:00
Freddy Boulton
3f9ec2c345
Add a guide on how to use apps like functions (#1799)
* Add examples for series and parallel

* Create demo + guide

* More formatting

* Change name of guide

* Fix typo

* Use english to german as example instead

* Expand phrase a bit
2022-07-19 17:43:53 -04:00
Freddy Boulton
4a1879edaf
Remove usage of deprecated gr.inputs and gr.outputs from website (#1796)
* remove deprecated api from docs

* Remove usage of 'state' shortcut

* Back out state changes

* Back out state changes in creating_a_chatbot

* Link chatbot guide to Variable docs
2022-07-19 11:53:01 -04:00
Ali Abdalla
0dbc8bfcf3
Embedding Components on Docs (#1726)
* add component code to demos docker files

* fix demo_name

* frontend

* fix demo-name in frontend

* remove built with gradio

* remove extra space

* styling

* wait till page loads

* fixing components that require more parameters

* remove print statements

* check for correct run file

* combining component demos to one file

* typo

* fixes

* suffix name

* add is_component

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-07-19 16:20:20 +01:00
Freddy Boulton
8aba1c991b
Add info to docs on how to set default values for components (#1788)
* Explicitly set value and add to docs

* Fix wording a bit

* Remove sentence that's not adding much

* Remove extra word

* Delete screenshot
2022-07-19 11:16:56 -04:00
Freddy Boulton
006347459c
Add color picker to docs (#1768) 2022-07-18 11:55:48 +03:00
Freddy Boulton
de4458361b
Add gr.update to blocks guide (#1649)
* Add gr.update to guide

* Add to docs page and add step-by-step guide

* Fix documentation tests

* PR reviews

* Use code snippet

* Make section title plural

* Blocks utils in their own section
2022-07-14 11:43:38 -04:00
pngwn
c323aac274
add example component for color picker (#1779) 2022-07-13 16:35:43 +01:00
Freddy Boulton
600722c218
Add examples for series and parallel (#1738)
* Add examples for series and parallel

* Add ML demos for interface and load
2022-07-11 11:21:30 -04:00
Freddy Boulton
54f330af48
Add examples component to docs (#1729)
* Add examples to docs

* Adding guide for examples

* Exclude guides from methods

* PR feedback: typos, different allowed values of examples, docstrings
2022-07-08 11:32:08 -04:00
pngwn
8c4e134094
allow users to update the current tab from python SDK (#1709)
* allow users to update the current tab from python SDK

* rename var

* ensure tabs work when no selected or id kwargs are passed

* update xray config

* update test

* update test again

* Apply suggestions from code review

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

* change false to None

* update test configs

* fix test

* fix test

* update global tab selection

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-07-07 15:37:51 +01:00
Abubakar Abid
c9f522e02b
Allow excluding input components in examples (#1722)
* ignore None examples

* formatting

* added demo

* fixed test
2022-07-06 21:30:51 -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
e2cebde5e6
Allows setting custom <title> (#1703)
* fix title issue

* formatting

* docstrings and demos
2022-07-05 14:21:20 -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
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
Dawood Khan
eb42fc3cf8
Kitchen Sink Integration tests (#1588)
* tests

* more tests

* more tests

* remove files
2022-07-01 01:27:47 -04:00
Dawood Khan
7030a2a6cf
Fix example image thumbnail size (#1627)
* fix example image thumbnail size

* format

* remove cache examples

* add classes to token.css

* add small image
2022-07-01 01:27:35 -04:00
pngwn
1e6ceb9543
Mask image (#1621)
* changes

* add masking to image

* added preprocessing for mask

* tweaks + improvements to masking

* make mask work with webcam input

* cleanup

* fix default image

* fix default value when source is upload

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-25 01:11:28 +01:00
Dawood Khan
98121ee6a3
Issue #1594: Plot component is not cached with examples (#1600)
* fix plot cache examples

* format
2022-06-20 13:13:35 -05: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
aliabid94
11b12d9456
Scrolling by default only in Interface, remove progress animation on streaming (#1499)
* changes

* changes

* format

* changes

* add relative to block

* changes

* ensure statustracker component is never rendered by render

Co-authored-by: pngwn <hello@pngwn.io>
2022-06-13 17:11:19 -07:00
aliabid94
caa6a4e687
rework visible, attach to all components (#1511)
* changes

* fix
2022-06-13 16:49:23 -07:00
aliabid94
00e4b1436f
Allow styling height for Image and Video, also dynamic logic change (#1503)
* changes

* changes

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-10 19:56:07 -07:00
Ömer Faruk Özdemir
252f164026
add-multiple-event-demo (#1519) 2022-06-10 09:20:58 +03:00
aliabid94
f41ebdd616
Fix multiple file upload (#1512)
* changes

* Update utils.ts

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2022-06-09 16:53:41 -07:00
aliabid94
f3e070541e
Fix Login (#1501)
* changes

* format
2022-06-09 16:15:08 -07:00
aliabid94
293a5916cf
changes (#1504) 2022-06-09 15:46:07 -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
pngwn
cc6aeb6d72
distribute gradio as a web component (#1444)
* distribute gradio as a web component

* fix layout + loader + dark mode in embedded wc

* fix lockfile issue

* formatting

* prevent loader conflicts

* fix formatting
2022-06-07 11:11:44 -07:00
Ali Abdalla
42cee33dcf
API Docs with support for Blocks (#1397)
* backend

* updated PyPi version to 3.0.10

* updated PyPi version to 3.0.9b10

* fixes

* updated PyPi version to 3.0.9b11

* changes

* changes

* changes git push

* changes

* undo

* fixes

Co-authored-by: Ali Abid <aabid94@gmail.com>
2022-06-06 09:10:42 -07:00
pngwn
279df2322d
fix button styling (#1447) 2022-06-01 11:33:53 -07:00
pngwn
068132836c
Style updates (#1350)
* clean up python style api

* allow Box to be styled

* changes

* update style args and add md doc detailing

* cleanup

* add deprecation warnings

* fix

* formatting
2022-06-01 18:02:18 +01: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
Dawood Khan
2eaf61cf76
Integration tests (#1182)
* some integration tests

* more integration tests

* more tests

* update integration tests

* format
2022-05-27 04:53:50 -04:00
aliabid94
0a8222719e
fix default variable value (#1381)
* fix default variable value

* format
2022-05-26 14:22:05 -07:00
aliabid94
3a7f9a3b1a
Allow users to return dicts for values (#1373)
* changes

* changes

* add visible flag
2022-05-24 23:30:24 -07:00
Dawood Khan
a487ec2d3e
fix blocks-kinematics demo (#1340) 2022-05-19 16:52:04 -04:00
pngwn
096f4b5b56
add label to data frame (#1328) 2022-05-18 15:14:12 -07:00
Ali Abdalla
5b827f5b2c
Fixes to embedded demos in website docs (#1315)
* remove webcam from video demo

* remove blocks_gpt and blocks_neural_instrument_coding demos

* only show Try Examples if examples exist

* remove if name = main from rendereed code

* rename demos that have same name as component

* remove references to old demo names from guides

* add model3d demo
2022-05-17 14:18:51 -04:00
AK391
df4d9f472f
New big gifs (#1305)
* hello world gif update

* cropped hello world gif

* hello world 2 new gif

* update hello world 3 new gif

* fix hello world 2 gif

* update sephia filter gif

* update sales projection gif

* update calculator new gif

* update live calculator gif

* fix hello world gif

* update hello world 2 gif

* update gif for blocks_flipper
2022-05-17 00:33:55 -07:00
Abubakar Abid
ed8301d658
gifs in readme (#1298)
* hello world

* gif

* sepia

* replace calc gifs

* crop calculator gif

* final gifs

Co-authored-by: Dawood <dawoodkhan82@gmail.com>
Co-authored-by: AK391 <81195143+AK391@users.noreply.github.com>
2022-05-16 14:33:14 -07:00
Abubakar Abid
4c7d0ac6d6
gif (#1296) 2022-05-16 13:41:06 -07:00
Abubakar Abid
56f1843931
Update readme (#1292)
* update readme

* update readme

* update readme
2022-05-16 13:31:56 -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
pngwn
8b1a50775a
General tweaks (#1276)
* tweaks + radio fix

* remove unused prop

* revert demo

* ensure table renders empty strings and zeroes

* remove logs

* remove bundle stats
2022-05-16 18:22:09 +01:00
aliabid94
a4aa6a2cb9
Add embedded demos to website (#1270)
* 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

* styling demo window

* copy work

* hide demo buttons

* remove index

* remove layouts from docs

* remove merge artifact

* merge dockerfile

* chagnes

* changes

* changes

* changes

* styling demo window

* revert most things

* whoops

* chagnes

* changes

* changes

* changes

* changes

* changes

* changes

* format

* changes

* fixed Dataset docstring

* fix component signature and add required

* adding string shortcuts

* fix small issues parameter docstringss

* string shortcuts

* fixed gallery and label values

* added for remaining parameters

* formatting

* extended embedded components

* typo

* remove capitalization from embeddings

* try examples button

* added demos for blocks and combining interfaces

* demos styling

* homepage update (#1275)

* spacing

* remove console.log

* demo window fixes

* new spaces

* shorten codeblock width

* fix plot

* better string shortcuts

* add embedding config for json

* remove console log

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
2022-05-16 11:45:38 -04:00
Abubakar Abid
ecda9d1c53
Improves "Getting Started" guide (#1269)
* making quickstart better

* fixed quickstart

* quickstart

* advanced features

* advanced features

* simplified blocks demo

* added sidebars to guides

* added a little bit of padding

* shortened
2022-05-16 08:35:17 -07:00
aliabid94
569a16998d
fix slider (#1268) 2022-05-15 23:55:35 -07:00
pngwn
ed074f9cff
Static forms (#1264)
* refactor dynamic-static detection

* refactor dynamic-static detection
2022-05-15 18:44:15 +01: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
pngwn
97929ee795
ui apis for dalle-mini (#1258)
* ui apis for dalle-mini

* changes
2022-05-13 18:37:55 -07:00
Ömer Faruk Özdemir
b8c4d3d6b8
Update run.py (#1253) 2022-05-13 19:10:45 +03:00
pngwn
700c4fc9cf
Layout bugs (#1246)
* fix layout issues

* fix visible kwarg + demo tweak

* fix blocks error wwhen parent is not column or row
2022-05-13 15:47:50 +01: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
5fc00b4567
Automatic word-break in highlighted text, combine_adjacent support (#1209)
* changes

* changes

* updated PyPi version to 2.9b26

* changes

* css tweaks (#1213)

* css tweaks

* more tweaks

* fix lint error

Co-authored-by: pngwn <hello@pngwn.io>
2022-05-11 20:09:25 +01: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
pngwn
4ca48284bb
hltext-label (#1204)
* show highttext label + tweaks

* show highttext label + tweaks
2022-05-10 17:01:36 +01: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
pngwn
936631c5b4
1183 component height (#1185)
* fix flex for layouts

* fix row form groups

* cleanup
2022-05-07 16:50:31 +01:00
aliabid94
b7ed8d6646
changes (#1167)
Co-authored-by: Ali Abid <aliabid94@gmail.com>
2022-05-05 17:50:51 -07:00
pngwn
56222fbe2b
1148 loading status (#1164)
* update loader

* fix for non queued statuses

* remove logs

* Update demo/fake_gan/run.py
2022-05-05 20:05:05 +01:00
aliabid94
3e4ac376f5
Custom JS calls (#1082)
* first

* requested changes

* fix

* changes

* fixes

Co-authored-by: Ali Abid <aliabid94@gmail.com>
2022-05-04 09:02:29 -07:00
aliabid94
8464481e22
image gallery component + img css (#1140)
* first commit

* format

* first commit

* Gallery component (#1142)

* gallery

* ui update

* scroll gallery items, keeping them centered

* fix keyboard event

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>

* formatting

* formatting

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Victor Muštar <victor.mustar@gmail.com>
2022-05-03 14:49:51 -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
pngwn
e34210ccda
max_lines + autoheight for textbox (#1153)
* ensure autoheight always reruns when value changes

* implement lines + max_lines for textbox

* update demo

* fix test
2022-05-03 18:28:57 +01:00
pngwn
ce77c73551
add select event for tabitems (#1154) 2022-05-03 18:21:29 +01:00
Dawood Khan
190858ffb2
Chatbot custom color support (#1092)
* add color functionality to chatbot text bubbles

* chagne chatbot background colors

* chatbot color fixes

* merge conflict fix

* format fix

* chatbot fixes

* format

* remove prints
2022-05-02 09:41:20 +01:00
Victor Muštar
5f6ff85106
Examples UI (#1121)
* add fonts

* Update tailwind.config.js

* Examples UI

* demos examples update

* text align

* prettier

* formatting

Co-authored-by: Ali Abid <aliabid94@gmail.com>
2022-05-02 09:38:18 +01:00