gradio/js
Dawood Khan 05892302fb
Adds kwarg to disable html sanitization in gr.Chatbot() (#5304)
* disable sanitize

* add changeset

* Fix devcontainer postCreateCommand (#5289)

* add chmod commands to grant execute permissions to each script before running them

* increase the memory limit

* Increase memory requirement to 8

* Setting a minimum specification for codespace machines

* Rotate axes labels on LinePlot, BarPlot, and ScatterPlot (#5305)

* add chmod commands to grant execute permissions to each script before running them

* increase the memory limit

* Increase memory requirement to 8

* Setting a minimum specification for codespace machines

* Added label_angle parameter to LinePlot

* add the x_label_angle and y_label_angle to the postprocess

* Add x_label_angle and y_label_angle to ScatterPlot

* Add x_label_angle and y_label_angle to BarPlot

* Remove postCreateCommand update from this PR, it is in its own PR

* Remove custumization on the devcontainer, it is on another PR

* Remove extra line  on the devcontainer, it is on another PR

* add changeset

* update the parameter definition in the docstring

---------

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* `make_waveform()` twitter video resolution fix (#5296)

* waveform res fix

* add changeset

* add changeset

* Improve audio streaming (#5238)

* changes

* changes

* add changeset

* add changeset

* chages

* Update silver-clowns-brush.md

* changes

* chagers

* changes

* Update silver-clowns-brush.md

* change

* change

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>

* 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>

* test

* test

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabid94 <aabid94@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Allow caching examples with streamed output (#5295)

* changes

* changes

* add changeset

* add changeset

* chages

* Update silver-clowns-brush.md

* changes

* chagers

* changes

* Update silver-clowns-brush.md

* change

* change

* change

* changes

* chages

* changes

* add changeset

* changes

* changes

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: pngwn <hello@pngwn.io>

* Create event listener table for components on docs (#5298)

* changes

* changes

* remove languages from code docs

* fix img path in guide

* rework event listeners

* add changeset

* remove console log

* name it event arguments

* Update js/_website/src/lib/components/EventListeners.svelte

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

* Update js/_website/src/lib/components/EventListeners.svelte

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

* requested changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* merge

* fix (#5308)

* 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>

* Restores missing part of bottom border on file component (#5313)

* removes missing part of bottom border on file component

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* chore: update versions (#5177)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Test Blocks.svelte footer copy (#5307)

* test test

* fix test

* tweak

* tweak test name

* ensure login form has correct styles (#5324)

* fix changelog generation (#5328)

* Add ignore scripts to pnpm i in pypi action (#5316)

* add json generation to prepare

* add changeset

* remove pnpm prepare

* add changeset

* bring back prepare, add ignore scripts

* delete changeset

* add to right commadn

* add frozen lockfile to gh_action_pypi

* remove unused gh_action_pypi script

* remove unused scripts

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* ensure dropdown stays open when identical data is passed in (#5323)

* ensure dropwdown stays open when new data is passed in

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Fix ci again again again (#5329)

* fix changelog generation

* fix changelog generation

* fix

* chore: update versions (#5326)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix ci again again again (#5330)

* fix changelog generation

* fix changelog generation

* fix

* fix script

* Fix ci again again again (#5331)

* fix changelog generation

* fix changelog generation

* fix

* fix script

* fix script

* Fix ci again again again (#5332)

* fix changelog generation

* fix changelog generation

* fix

* fix script

* fix script

* fix vars

* Fix ci again again again (#5333)

* fix changelog generation

* fix changelog generation

* fix

* fix script

* fix script

* fix vars

* fix vars

* Fix Checkbox select dispatch (#5340)

* Fix bug

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* Minor bug fix sweep (#5284)

* changes

* changes

* add changeset

* changes

* changes

* fix box changes on website

* add changeset

* changes

* changes

* Revert "changes"

This reverts commit 189b4e844a.

* chanegs

* changes

* changes

* changes

* changes

* add changeset

* Update fancy-bats-deny.md

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: aliabd <ali.si3luwa@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* Fix: wrap avatar-image in a div to clip its shape (#5319)

* fix: wrap avatar-image in a div to clip its shape

and add data url support

* add changeset

* revert get file from data url

* add changeset

---------

Co-authored-by: Dawood Khan <dawoodkhan82@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>

* chore: update versions (#5341)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* add kwarg to markdown

* add changeset

* config

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Faiga Alawad <faiga.alawd91@gmail.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Co-authored-by: aliabid94 <aabid94@gmail.com>
Co-authored-by: pngwn <hello@pngwn.io>
Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Co-authored-by: Keldos <Keldos.ljw@gmail.com>
2023-08-29 00:26:29 -04:00
..
_cdn-test format (#4810) 2023-07-06 18:43:49 +01:00
_spaces-test Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
_website Adds kwarg to disable html sanitization in gr.Chatbot() (#5304) 2023-08-29 00:26:29 -04:00
accordion chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
annotatedimage chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
app chore: update versions (#5341) 2023-08-25 12:07:20 -07:00
atoms chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
audio chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
box chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
button chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
chatbot Adds kwarg to disable html sanitization in gr.Chatbot() (#5304) 2023-08-29 00:26:29 -04:00
checkbox chore: update versions (#5341) 2023-08-25 12:07:20 -07:00
checkboxgroup chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
code chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
colorpicker chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
column Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
dataframe chore: update versions (#5326) 2023-08-24 18:47:07 +01:00
dropdown chore: update versions (#5326) 2023-08-24 18:47:07 +01:00
file chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
form chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
gallery chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
group Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
highlightedtext chore: update versions (#5341) 2023-08-25 12:07:20 -07:00
html chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
icons unified release process (#4986) 2023-07-21 19:13:21 +01:00
image chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
json chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
label chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
lite chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
markdown Adds kwarg to disable html sanitization in gr.Chatbot() (#5304) 2023-08-29 00:26:29 -04:00
model3D chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
number chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
plot chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
radio chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
row remove index files and update test paths (#5262) 2023-08-18 16:33:07 +01:00
slider chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
state Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
statustracker chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
storybook ensure login form has correct styles (#5324) 2023-08-24 16:42:28 +01:00
tabitem chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
tabs chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
textbox chore: update versions (#5326) 2023-08-24 18:47:07 +01:00
theme chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
timeseries chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
tooltip Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
tootils chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
upload chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
uploadbutton chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
utils chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
video chore: update versions (#5177) 2023-08-23 15:41:08 -07:00
wasm Refactor component directories (#5074) 2023-08-03 23:01:18 +01:00
.npmrc
jsx.d.ts
README.md

gradio-ui

This folder contains all of the Gradio UI and component source code.

setup

This folder is managed as 'monorepo' a multi-package repository which make dependency management very simple. In order to do this we use pnpm as our package manager.

Make sure pnpm is installed by following the installation instructions for your system.

You will also need node which you probably already have

running the application

Install all dependencies:

pnpm i

This will install the dependencies for all packages and link any local packages

local development

To develop locally, open two terminal tabs from the root of the repository.

Run the python test server, from the root directory:

cd demo/kitchen_sink
python run.py

This will start a development server on port 7860 that the web app is expecting.

Run the web app:

pnpm dev

building for production

Run the build:

pnpm build

This will create the necessary files in js/app/public and also in gradio/templates/frontend.

quality checks

The repos currently has two quality checks that can be run locally and are run in CI.

formatting

Formatting is handled by prettier to ensure consistent formatting and prevent style-focused conversations. Formatting failures will fails CI and should be reoslve before merging.

To check formatting:

pnpm format:check

If you have formatting failures then you can run the following command to fix them:

pnpm format:write

type checking

We use TypeScript to provide static types to javascript code. These checks are also run in CI.

to typecheck the code:

pnpm ts:check

ci checks

Currently the following checks are run in CI:

static checks

  • Format check (pnpm format:check)
  • Build css (pnpm css)
  • Build client (pnpm build)
  • Type check (pnpm ts:check)
  • Unit tests (pnpm test:run)

functional test

pip install -r demo/outbreak_forecast/requirements.txt
pnpm exec playwright install chromium
pnpm exec playwright install-deps chromium
pnpm test:browser:full