gradio/js
2024-04-25 19:58:42 +01:00
..
_cdn-test chore(deps): update dependency iframe-resizer to v4.3.11 (#8092) 2024-04-22 09:35:35 -07:00
_spaces-test update dependencies (#8122) 2024-04-24 23:55:14 +01:00
_website update dependencies (#8122) 2024-04-24 23:55:14 +01:00
accordion make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
annotatedimage make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
app Using keys to preserve values between reloads (#8056) 2024-04-25 11:25:53 -07:00
atoms chore: update versions (#7992) 2024-04-18 18:09:10 +00:00
audio Hide the scroll bar in WaveformControls when it's not necessary (#8065) 2024-04-23 13:27:39 +09:00
box chore: update versions (#7992) 2024-04-18 18:09:10 +00:00
button make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
chatbot make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
checkbox make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
checkboxgroup make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
code make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
colorpicker make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
column make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
dataframe make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
dataset make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
downloadbutton make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
dropdown make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
fallback make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
file make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
fileexplorer make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
form make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
gallery make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
group make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
highlightedtext make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
html make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
icons chore: update versions (#7992) 2024-04-18 18:09:10 +00:00
image make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
imageeditor make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
json make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
label make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
lite chore: update versions (#7992) 2024-04-18 18:09:10 +00:00
markdown make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
model3D make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
multimodaltextbox make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
number make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
paramviewer make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
plot make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
preview allow custom component authors to provide custom vite plugins and svelte preprocessors (#6787) 2024-04-25 19:58:42 +01:00
radio make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
row make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
simpledropdown make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
simpleimage make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
simpletextbox make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
slider make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
state
statustracker make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
storybook Add max_file_size parameter to launch() that limits the size of files that can be uploaded in the Gradio app (#7909) 2024-04-19 15:38:53 -04:00
tabitem make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
tabs make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
textbox make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
theme chore: update versions (#7992) 2024-04-18 18:09:10 +00:00
tooltip
tootils Add max_file_size parameter to launch() that limits the size of files that can be uploaded in the Gradio app (#7909) 2024-04-19 15:38:53 -04:00
upload Add max_file_size parameter to launch() that limits the size of files that can be uploaded in the Gradio app (#7909) 2024-04-19 15:38:53 -04:00
uploadbutton make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
utils Add max_file_size parameter to launch() that limits the size of files that can be uploaded in the Gradio app (#7909) 2024-04-19 15:38:53 -04:00
video make gradio dev tools a local dependency rather than bundling (#8066) 2024-04-19 18:41:40 -04:00
wasm chore: update versions (#7771) 2024-03-25 12:35:44 -04: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