diff --git a/.changeset/old-maps-enter.md b/.changeset/old-maps-enter.md
new file mode 100644
index 0000000000000..3f7ee8c47a57e
--- /dev/null
+++ b/.changeset/old-maps-enter.md
@@ -0,0 +1,8 @@
+---
+"@gradio/client": minor
+"@gradio/icons": minor
+"@gradio/statustracker": minor
+"gradio": minor
+---
+
+feat:add gr.Success and update windows contributing
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 5c97432c23ca7..772b24e3cf94c 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,30 +36,97 @@ There are a few ways to install and run Gradio.
- Clone this repo
- Navigate to the repo directory and run:
+
+
+
MacOS / Linux
+
Windows
+
+
+
```bash
bash scripts/install_gradio.sh
```
+
+
+
+```bash
+scripts\install_gradio.bat
+```
+
+
+
- Run the frontend (only required if you are making changes to the frontend and would like to preview them)
+
+
+
MacOS / Linux
+
Windows
+
+
+
```bash
bash scripts/run_frontend.sh
```
+
+
+
+```bash
+scripts\run_frontend.bat
+```
+
+
+
- Install test requirements (only required if you want to run tests locally)
(Note that it is highly recommended to use a virtual environment running **Python 3.10** since the versions of Gradio's dependencies are pinned)
+
+
### 📦 Using dev containers
@@ -99,7 +166,7 @@ If you're a newcomer to Gradio, we recommend getting familiar with the overall s
You can get started by creating an `app.py` file in the root:
-```
+```py
import gradio as gr
with gr.Blocks() as demo:
@@ -123,9 +190,27 @@ Note: if you have `gradio` installed elsewhere in your system, you may need to u
If you're making frontend changes, start the frontend server:
+
+
+
+
MacOS / Linux
+
Windows
+
+
+
+
```bash
bash scripts/run_frontend.sh
```
+
+
+
+```bash
+scripts\run_frontend.bat
+```
+
+
+
This will open a separate browser tab. By default, Gradio will launch this on port 9876. Any changes to the frontend will also reload automatically in the browser. For more information about developing in the frontend, you can refer to [js/README.md](js/README.md).
@@ -142,9 +227,26 @@ We use Pytest, Playwright and Vitest to test our code.
- The Python tests are located in `/test`. To run these tests:
+
+
+
MacOS / Linux
+
Windows
+
+
+
+
```
bash scripts/run_backend_tests.sh
```
+
+
+
+```bash
+scripts\run_backend_tests.bat
+```
+
+
+
- The frontend unit tests are any defined with the filename `*.test.ts`. To run them:
@@ -259,7 +361,7 @@ and then from the website directory:
pnpm dev
```
-#### Main vs Released
+#### Main vs. Released
The website supports documentation for both the latest released version on pypi as well as the main build on github. You can switch between them on the website by using the toggle on any page or by prefixing '/main' before the route in the url. For example: https://www.gradio.app/main/guides/quickstart
@@ -270,9 +372,26 @@ If you're making changes to documentation and are wondering why they're not show
Gradio-Lite is a Pyodide-based library that lets you run Gradio serverless (in other words, directly in your browser).
You can start the development server by running:
+
+
+
MacOS / Linux
+
Windows
+
+
+
+
```
bash scripts/run_lite.sh
```
+
+
+
+```bash
+scripts\run_lite.bat
+```
+
+
+
If you make changes to the Python code during development, you will need to rebuild the Python packages loaded to Graio-Lite. To do this, run:
```
@@ -280,9 +399,26 @@ pnpm --filter @gradio/lite pybuild
```
To generate the release build, run:
+
+
+
MacOS / Linux
+
Windows
+
+
+
+
```
bash scripts/build_lite.sh
```
+
+
+
+```bash
+scripts\build_lite.bat
+```
+
+
+
The release build will be located in the `dist` directory in the `js/lite` project.
To test it, you can run a local server in the `js/lite` directory:
```
@@ -302,15 +438,50 @@ All PRs should be submitted against `main`, and ideally should address an open i
Don't forget to format your code before pushing:
+
+
+
MacOS / Linux
+
Windows
+
+
+
+
```
bash scripts/format_backend.sh
```
+
+
+
+```bash
+scripts\format_backend.bat
+```
+
+
+
And if you made changes to the frontend:
+
+
+
+
MacOS / Linux
+
Windows
+
+
+
+
```
bash scripts/format_frontend.sh
```
+
+
+
+```bash
+scripts\format_frontend.bat
+```
+
+
+
Thank you for taking the time to contribute to Gradio!
@@ -339,10 +510,29 @@ rm pnpm-lock.yaml
and run the install scripts:
+
+