Commit Graph

167 Commits

Author SHA1 Message Date
pngwn
1dc797adcb
chore: update versions (#5341)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-25 12:07:20 -07:00
pngwn
632e4d8378
chore: update versions (#5326)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-24 18:47:07 +01:00
pngwn
31996c991d
ensure login form has correct styles (#5324) 2023-08-24 16:42:28 +01:00
Hannah
2592d4e380
Test Blocks.svelte footer copy (#5307)
* test test

* fix test

* tweak

* tweak test name
2023-08-24 12:12:27 +02:00
pngwn
ba4c6d9e65
chore: update versions (#5177)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-23 15:41:08 -07:00
pngwn
f769cb6714
only start listening for events after the components are mounted (#5312)
* only start listening for events after the components are mounted

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-23 23:07:58 +01:00
pngwn
fe057300f0
delegate gradio events via a custom event dispatcher (#5279)
* delegate gradio events via a custom event dispatcher

* improve md perf + share code

* fix df markdown

* prevent model3d from rerending too frequently

* tweaks

* fix more event bugs with video

* add changeset

* optimise handle mount

* does this do anything

* fix

* remove old dispatches

* fix dropdown position

* oops

* fixes

* fix tests

* fix types

* format

* fix markdown code

* add changeset

* fix typecheck

* fix typecheck

* fix demos

* notebooks

* fix tests

* changer

* maybe this

* fixes

* add changeset

* fix chatbot alignment mobile

* fix chantbot

* add changeset

* changeset

* changeset

* storybook

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-08-23 21:48:10 +01:00
Abubakar Abid
cdfd42174a
Tweaks to icon parameter in gr.Button() (#5285)
* button

* add changeset

* fix

* add changeset

* add changeset

* types

* type fix

* formatting

* fix based on review

* fix unit tests

* stories

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-22 15:05:22 -07:00
Hannah
804fcc058e
Add render function to <gradio-app> (#5158)
* add function on_load to gradio-app web element

* typo

* fix test

* add ready event

* add custom events and use onMount

* add changeset

* add changeset

* move event logic

* add changeset

* clean up whitespace

* add onloadcomplete to guide

* add changeset

* add changeset

* add highlight

* change event name to render and ensure it runs after DOM mounting is complete

* update docs

* rename var

* tweak

* renaming

* tweak

* tweaks

* mount statustracker nodes

* typo

* tweaks

* copy tweak

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-22 12:11:19 +02:00
Hannah
502f1015bf
Ensure Blocks translation copy renders correctly (#5276)
* fix copy render in blocks

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-21 06:54:42 -07:00
Hannah
46a2b600a7
ensure translations for audio work correctly (#5264)
* fix audio import

* set i18n locale

* add changeset

* tweak

* add changeset

* add curly brackets

* add changeset

* changes

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-08-18 17:37:19 +01:00
pngwn
96e4f5b922
remove index files and update test paths (#5262) 2023-08-18 16:33:07 +01:00
Hannah
4b58ea6d98
Update i18n tokens and locale files (#5216)
* tokenize en strings in components and refactor en.json

* add changeset

* refactor more translation files

* more translation files

* tweak

* fix test

* fix other test

* fix test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-18 12:36:52 +01:00
pngwn
ddac7e4d0f
Ensure File component uploads files to the server. (#5253)
* fix dynamic -> interactive

* fix checks

* add changeset

* add changeset

* fix changeset

* fix linting issues

* fix typing issue

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-08-17 12:20:19 -07:00
pngwn
fbdad78af4
Lazy load interactive or static variants of a component individually, rather than loading both variants regardless. This change will improve performance for many applications. (#5215)
* lazy load compoennts more granularly

* add changeset

* format

* add changeset

* fix casing

* fix casing

* fix casing

* revert changelog formatting

* add changeset

* revert changelog formatting

* add changeset

* make interactive updates work

* revert changelog stuff

* fix order

* fix static dataframe

* revert demo change

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-15 19:21:41 +01:00
Freddy Boulton
e8fd4e4ec6
Completely hide api page if show_api=False (#5219)
* Add code

* add changeset

* type check

* CHANGELOG

* Update dirty-snails-love.md

* Add test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-15 10:07:53 -04:00
pngwn
9d1bd28bdf
chore: update versions (#5038)
* chore: update versions

* update actions

* update changelog

* other changelgo

* extra

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-08-10 16:59:00 -04:00
Sanjaiyan Parthipan
eaa1ce14ac
Enhancing Tamil Translation: Language Refinement 🌟 (#5136)
* improve Tamil vocabulary 🔡

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-08 15:35:06 -04:00
pngwn
1419538ea7
Refactor component directories (#5074)
* asd

* changes

* fix everything

* cleanup

* add changeset

* fix casing

* lockfile

* fix casing

* fix ci, enable linting

* fix test

* add changeset

* add changeset

* delete changeset

* fix dirs

* fix casing

* fix notebooks

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

* fix casing

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-03 23:01:18 +01:00
Jody Zhou
f5539c7618
Enhancement: Add focus event to textbox and number component (#5005)
* Add focus event to textbox and number component

* add changeset

* Combine Blurrable and Focusable into Focusable event

* Add focus and blur to Dropdown and Colorpicker components

* add focus to home page template

* Add Focus to doc

* Fix linting error

* fixes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Ali Abid <aabid94@gmail.com>
2023-08-01 16:02:50 -04:00
Hannah
883ac364f6
Add step param to Number (#5047)
* add step param to number component

* add changeset

* fix test

* fix BE test

* fix test again

* update number.py

* fix test

* test fix

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-08-01 12:44:33 +01:00
Hannah
6693660a79
Add download button to selected images in Gallery (#5025)
* add download button to gallery selected images

* add changeset

* add story

* tweak

* fix href val for internal file paths

* set show_download_button to True by default

* lint backend

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-07-31 19:31:49 +02:00
Hannah
5244c5873c
Allow new lines in HighlightedText with /n and preserve whitespace (#5046)
* allow new lines in highlighted text with /n

* add changeset

* preserve white spaces in text

* add changeset

* add changeset

* add highlighted text stories

* add changeset

* fix broken story

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-07-31 16:54:29 +02:00
pngwn
861d752a83
chore: update versions (#4999)
* chore: update versions

* undo diff

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-07-26 17:10:24 -04:00
aliabid94
44ac8ad08d
Allow setting sketch color default (#4979)
* changes

* add changeset

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-07-25 11:39:51 -07:00
Hannah
3f8c210b01
Implement left and right click in Gallery component and show implicit images in Gallery grid (#4995)
* tweak responsive behaviour in gallery

* test

* add function to move left + right on click

* add changeset

* fix ts error

* Delete soft-eyes-repeat.md

* add changeset

* add gallery story

* change y overflow to scroll

---------

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-07-25 15:02:44 +01:00
Abubakar Abid
dc07a9f947
Revert "Revert "Add download button for audio"" (#4993)
* Revert "Revert "Add download button for audio (#4977)" (#4992)"

This reverts commit ad99df4fdd.

* removed changelog updates

* add changeset

* credit leuryr

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2023-07-22 03:20:29 +03:00
pngwn
62306d9ed1
unified release process (#4986)
* Implement unified version and release mechanism for all python and javascript packages.

* Update gradio/package.json

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

* fix changelog

* fix changelog

* Update js/button/README.md

* Update .github/workflows/generate-changeset.yml

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-07-21 19:13:21 +01:00
Abubakar Abid
ad99df4fdd
Revert "Add download button for audio (#4977)" (#4992)
This reverts commit c58ea4780f.
2023-07-21 08:00:33 +03:00
Leury Rodriguez
c58ea4780f
Add download button for audio (#4977)
* Add download button for audio

* Add summary to CHANGELOG

* Add bool param to gr.Audio for button visibility

* Update CHANGELOG

* formatting

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-07-21 07:43:15 +03:00
aliabid94
b68aeea412
Improve gr.ChatInterface UI, add autofocus to textbox (#4978)
* changes

* changes

* lint

* fix tests

* fix

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-07-20 14:44:52 +03:00
Hannah
a0efc1180d
Add show_download_button to gr.Image() (#4959)
* add show_download_button param

* add static image story

* chlog

* fix test

* typo

* add default value

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

* fix test

* fix another test

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-07-19 19:00:02 +01:00
Hannah
224b596314
Fix cropped videos CSS bug (#4946)
* add width/height to video wrap

* add comment on progress

* add video story

* upload utils linting

* fix a11y violations

* chlog

* add width/height args

* remove on changes chromatic flag

* test

* remove test
2023-07-19 09:32:32 +01:00
aliabid94
edde958e32
fix (#4949) 2023-07-17 14:29:01 -04:00
Abubakar Abid
5a511f02af
A high-level ChatInterface abstraction (#4869)
* push

* chat interface

* remove video artifact

* changes

* restore

* changes

* more functions

* clean

* chat interface

* chat interface

* Update gradio/chat_interface.py

* nit

* changes

* api fix

* chat interface

* guide

* guide

* changes

* fixes

* Added ChatInterface Examples for Langchain, OpenAI Streaming, and HF's Text Generation Inference (StarChat)

* docstring

* tests

* tests

* tests

* tests

* rename

* guide

* chatbot

* conclusion

* demo notebooks

* clog

* test

* chat interface

* fixes

* functional test

* test

* notebook

* guides

* typing

* docstring

* script

* upgrade pyright

* upgrade pyright

* Update CHANGELOG.md

* revert pyright upgrade

* typing

* redirects

* Update CHANGELOG.md

* guide

* guide

* readme

* screenshot

* add to readme

* quickstart

* readme

* Added transformers open-source LLM example using ChatInterface

* Minor nits to guide

* Minor tweak to test - use connect fixture

* website fixes

* nav

* guide

* fix tests'

* fix

* type

* clear

* chat interface

* fix test

* fix guide

* handle edge case

* edge case

* typing

* fix example caching with streaming

* typing

---------

Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Yuvraj Sharma <48665385+yvrjsharma@users.noreply.github.com>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
2023-07-17 13:22:47 -04:00
aliabid94
f2fd37ee59
Fix gr.Group, container=False (#4916)
* changes

* changes

* changes

* changes

* changes

* fix

* changes

* changes

* Deploy group demo

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com>
2023-07-17 10:05:46 -07:00
Abubakar Abid
b16732ffb2
Add RTL support to Textbox, Markdown, Chatbot (#4933)
* add rtl support

* redo

* remove param

* clog

* fix backend tests; add textbox story

* add textbox story

* fix textbox story

* fixed textbox story, markdown

* markdown story

* format

* fixes'

* Update CHANGELOG.md

* update docstrings

* fix tests

* fix static checks

* fix tests
2023-07-17 12:53:23 -04:00
Hannah
7f6d0e19ad
Fix images being cut off within a gr.Row()'s children (#4896)
* apply missing flex to Row component

* remove redundant !important

* changelog

* add (sort of a) row test

* remove import
2023-07-17 17:08:17 +01:00
aliabid94
3474122cb3
Fix API page code snippets in safari (#4924)
* changes

* changes
2023-07-14 09:53:42 -07:00
pngwn
3a4b1d8f8b
move all of the chatbot component in to js/chatbot (#4900)
* changes

* fix test

* changes
2023-07-13 17:41:47 +01:00
Freddy Boulton
d3e1d272d5
Fix flaky ui test (#4906)
* Debug

* Upload screenshots

* Fix path

* turn on verbose mode

* turn on verbose mode

* turn on verbose mode

* await click

* cleanup

* trigger ci

---------

Co-authored-by: pngwn <hello@pngwn.io>
2023-07-12 21:08:36 -04:00
Abubakar Abid
abd0ced3db
Fixes .change() in Video, Audio, Image (#4793) 2023-07-11 16:56:46 +01:00
Freddy Boulton
c17b91e114
Fix flaky e2e test (#4864)
* Split test into two

* Don't use await

* Dont use await
2023-07-10 15:53:09 -04:00
Freddy Boulton
34d5053076
Fire File change event when updated programmatically (#4811)
* Change

* Add code

* remove comments

* Add changelog

* remove test

* Fix typo
2023-07-10 11:29:34 -04:00
Dawood Khan
504c9d9d06
Add hyperlinks to download files in chatbot (#4848)
* add file links

* changelog
2023-07-10 10:34:01 -04:00
Yuichiro Tachibana (Tsuchiya)
7dbfa228f7
Lite: PoC of an online editor (#4809)
* Add a Svelte app for local development

* Update the dev editor to deal with multiple files

* Rename the File type

* Rename entities

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-07-10 10:00:05 +01:00
aliabid94
280b5697eb
Mobile queue fixes (#4742)
* changes

* changes

* changes

* changes

* changes

* Styling for error, warning and info toasts (#4603)

* create abstract toast component for info/warning/error

* add icons

* add light mode theming

* add theme mode check and dark mode styles

* update theme_mode on update

* clean up render of toast content

* replace dynamic css vars with toast type css selectors

* tweak colours

* change error pill border colour to align with toasts

* formatting

* fix failed test

* rename icon files and clean up css

* changes

* changes

* changes

* changes

* changes

* changes

* chanegs

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

* changes

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
2023-07-07 14:39:06 -05:00
Freddy Boulton
9b56057a98
Add gr.ClearButton component demo (#4819)
* add code

* Add notebook

* Fix typos

* Remove css

* Add notebook
2023-07-07 11:51:18 -04:00
Freddy Boulton
0f8e25cd65
Fix gr.Warning/gr.Info when using generators + interface (#4823)
* Fix bug

* Fix notebook

* Add test

* Lint backend
2023-07-06 19:37:20 -05:00
Freddy Boulton
4b7cb2a436
Add storybook for Gallery (#4818)
* Add stories

* Add show_share_button story + label

* Fix typo
2023-07-06 17:31:17 -05:00