gradio/ui
pngwn e3c613af68
add vite (#517)
* switch from rollup to vite

* remove unused deps
2022-02-01 18:25:20 +00:00
..
packages add vite (#517) 2022-02-01 18:25:20 +00:00
.gitignore Multi pkg (#515) 2022-02-01 13:45:55 +00:00
.prettierignore format frontend code with prettier (#516) 2022-02-01 15:46:50 +00:00
.prettierrc.json format frontend code with prettier (#516) 2022-02-01 15:46:50 +00:00
package.json format frontend code with prettier (#516) 2022-02-01 15:46:50 +00:00
pnpm-lock.yaml add vite (#517) 2022-02-01 18:25:20 +00:00
pnpm-workspace.yaml Multi pkg (#515) 2022-02-01 13:45:55 +00:00
README.md format frontend code with prettier (#516) 2022-02-01 15:46:50 +00:00

gradio-ui

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

set up

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 from the ui folder:

cd ui
pnpm i

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

local development

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

Run the python test server:

cd demo/kitchen_sink
python run.py

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

Run the web app:

cd ui
pnpm dev

building for production

From the ui folder run the build.

cd ui
pnpm build

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