Skip to content

Commit

Permalink
Merge branch '5.0-dev' into file-access-security-guide-2
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyaboulton committed Aug 22, 2024
2 parents f3e6eeb + 4d9f665 commit 981330d
Show file tree
Hide file tree
Showing 309 changed files with 2,945 additions and 679 deletions.
5 changes: 0 additions & 5 deletions .changeset/better-results-try.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/busy-files-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:Fix native plot lite demos
5 changes: 0 additions & 5 deletions .changeset/cold-papayas-flow.md

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@gradio/spaces-test", "@gradio/cdn-test"]
"ignore": ["@self/spaces-test", "@self/cdn-test"]
}
5 changes: 0 additions & 5 deletions .changeset/cuddly-news-stare.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/every-parks-count.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/flat-meals-obey.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/giant-beers-decide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/honest-phones-film.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/little-trams-wait.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/new-masks-retire.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/olive-loops-look.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/petite-animals-raise.md

This file was deleted.

93 changes: 49 additions & 44 deletions .changeset/soft-breads-say.md → .changeset/plenty-cycles-chew.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,71 @@
---
"@gradio/accordion": patch
"@gradio/multimodaltextbox": patch
"@gradio/highlightedtext": patch
"@gradio/annotatedimage": patch
"@gradio/atoms": patch
"@gradio/audio": patch
"@gradio/box": patch
"@gradio/build": patch
"@gradio/button": patch
"@gradio/chatbot": patch
"@gradio/checkbox": patch
"@self/component-test": patch
"@gradio/downloadbutton": patch
"@gradio/simpledropdown": patch
"@gradio/checkboxgroup": patch
"@gradio/client": patch
"@gradio/code": patch
"@gradio/simpletextbox": patch
"@gradio/statustracker": patch
"@gradio/fileexplorer": patch
"@gradio/uploadbutton": patch
"@gradio/colorpicker": patch
"@gradio/column": patch
"@gradio/core": patch
"@gradio/imageeditor": patch
"@gradio/paramviewer": patch
"@gradio/simpleimage": patch
"@gradio/nativeplot": patch
"@gradio/accordion": patch
"@gradio/dataframe": patch
"@gradio/dataset": patch
"@self/storybook": patch
"website": patch
"@gradio/checkbox": patch
"@gradio/datetime": patch
"@gradio/downloadbutton": patch
"@gradio/dropdown": patch
"@gradio/fallback": patch
"@gradio/file": patch
"@gradio/fileexplorer": patch
"@gradio/form": patch
"@gradio/markdown": patch
"@gradio/chatbot": patch
"@gradio/dataset": patch
"@gradio/gallery": patch
"@gradio/model3d": patch
"@gradio/preview": patch
"@gradio/tabitem": patch
"@gradio/textbox": patch
"@gradio/tooltip": patch
"@self/tootils": patch
"@gradio/client": patch
"@gradio/button": patch
"@gradio/column": patch
"@gradio/number": patch
"@gradio/slider": patch
"@gradio/upload": patch
"@gradio/atoms": patch
"@gradio/audio": patch
"@self/build": patch
"@gradio/group": patch
"@gradio/highlightedtext": patch
"@gradio/html": patch
"@gradio/icons": patch
"@gradio/image": patch
"@gradio/imageeditor": patch
"@gradio/json": patch
"@gradio/label": patch
"@gradio/markdown": patch
"@gradio/model3d": patch
"@gradio/multimodaltextbox": patch
"@gradio/nativeplot": patch
"@gradio/number": patch
"@gradio/paramviewer": patch
"@gradio/plot": patch
"@gradio/radio": patch
"@gradio/row": patch
"@gradio/simpledropdown": patch
"@gradio/simpleimage": patch
"@gradio/simpletextbox": patch
"@gradio/slider": patch
"@gradio/spa": patch
"@gradio/state": patch
"@gradio/statustracker": patch
"@gradio/tabitem": patch
"@gradio/tabs": patch
"@gradio/textbox": patch
"@gradio/theme": patch
"@gradio/timer": patch
"@gradio/tooltip": patch
"@gradio/upload": patch
"@gradio/uploadbutton": patch
"@gradio/utils": patch
"@gradio/video": patch
"@gradio/code": patch
"@gradio/core": patch
"@gradio/file": patch
"@gradio/form": patch
"@gradio/html": patch
"@gradio/json": patch
"@gradio/lite": patch
"@gradio/plot": patch
"@gradio/tabs": patch
"@gradio/wasm": patch
"gradio": patch
"gradio_test": patch
"@self/app": patch
"@gradio/box": patch
"@gradio/row": patch
"@self/spa": patch
---

feat:setup npm-previews of all packages
fix:fix exports and generate types
5 changes: 0 additions & 5 deletions .changeset/poor-years-sin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rare-parks-act.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/ripe-aliens-invent.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/smart-pants-dance.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/violet-eyes-stand.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/weak-days-thank.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wild-wings-send.md

This file was deleted.

19 changes: 0 additions & 19 deletions .changeset/wise-buttons-act.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-sites-learn.md

This file was deleted.

2 changes: 1 addition & 1 deletion .config/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**/js/wasm/dist/**
**/js/preview/dist/**
**/client/js/dist/**
**/js/lite/dist/**
**/js/*/dist/**
**/pnpm-lock.yaml
**/js/plot/src/Plot.svelte
**/.svelte-kit/**
Expand Down
5 changes: 3 additions & 2 deletions .config/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const { browser, es2021, node } = globals;
export default [
{
ignores: [
".svelte-kit/**/*",
"**/.svelte-kit/**/*",
"**/node_modules/**",
"**/dist/**",
"**/.config/*",
Expand All @@ -75,7 +75,8 @@ export default [
"**/_website/**/*",
"**/_spaces-test/**/*",
"**/preview/test/**/*",
"**/component-test/**/*"
"**/component-test/**/*",
"**/js/wasm/src/webworker/**/*"
]
},
{
Expand Down
5 changes: 5 additions & 0 deletions .config/svelte.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";

export default {
preprocess: vitePreprocess()
};
4 changes: 2 additions & 2 deletions .github/actions/install-all-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ runs:
venv/*
client/python/venv
restore-keys: |
gradio-lib-${{inputs.os}}-latest-pip-
key: "gradio-lib-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-
key: "gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
- name: Install ffmpeg
uses: FedericoCarboni/setup-ffmpeg@583042d32dd1cabb8bd09df03bde06080da5c87c # @v2
- name: Install test dependencies
Expand Down
6 changes: 5 additions & 1 deletion .github/actions/install-frontend-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ runs:
if: inputs.skip_build == 'false' && steps.frontend-cache.outputs.cache-hit != 'true'
shell: bash
run: pnpm build
- name: generate types
if: inputs.always_install_pnpm == 'true' || inputs.skip_build == 'false' || inputs.build_lite == 'true'
shell: bash
run: pnpm package
- name: Build frontend lite
if: inputs.build_lite == 'true'
shell: bash
run: |
. venv/bin/activate
python -m pip install -U build hatch packaging>=23.2 # packaging>=23.2 is needed to build Lite due to https://github.com/pypa/hatch/issues/1381
pnpm --filter @gradio/lite build
pnpm build:lite
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
. venv/bin/activate
pip install -U build hatch packaging>=23.2 # packaging>=23.2 is needed to build Lite due to https://github.com/pypa/hatch/issues/1381
pnpm --filter @gradio/client --filter @gradio/lite --filter @gradio/preview build
- name: create and publish versions
id: changesets
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # @v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ gradio/hash_seed.txt
flagged/
gradio_cached_examples/
tmp.zip
gradio/hash_seed.txt

# Tests
.coverage
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# gradio

## 4.42.0

### Features

- [#9128](https://github.com/gradio-app/gradio/pull/9128) [`747013b`](https://github.com/gradio-app/gradio/commit/747013bbacebae6bfdda554b45e541e80b2894e0) - Allow accessing the entire row of selected values in `gr.DataFrame`. Thanks @abidlabs!
- [#8935](https://github.com/gradio-app/gradio/pull/8935) [`f6b2b97`](https://github.com/gradio-app/gradio/commit/f6b2b97d473dd81571410cccc6e1ddfcf9fa00bc) - Initialize the client with the fake host for Lite server. Thanks @whitphx!
- [#9031](https://github.com/gradio-app/gradio/pull/9031) [`04b7d32`](https://github.com/gradio-app/gradio/commit/04b7d327ec1227a693fc2dfea51b1e2729851bde) - Allow drag and replace image in `gr.Image` and Multimodal textbox. Thanks @hannahblair!
- [#8930](https://github.com/gradio-app/gradio/pull/8930) [`41d5ab9`](https://github.com/gradio-app/gradio/commit/41d5ab987ba9728753be4509490c79041655809b) - Add `placeholder` param to Image and ImageEditor to replace upload image text. Thanks @hannahblair!
- [#9023](https://github.com/gradio-app/gradio/pull/9023) [`87e3537`](https://github.com/gradio-app/gradio/commit/87e3537342017c7f19d012f0806a14bc264e09f9) - Add height param to gr.JSON. Thanks @hannahblair!
- [#9013](https://github.com/gradio-app/gradio/pull/9013) [`5350f1f`](https://github.com/gradio-app/gradio/commit/5350f1feb20cb7458d188403f319c5087052f695) - Add copy all messages button to chatbot. Thanks @hannahblair!
- [#9118](https://github.com/gradio-app/gradio/pull/9118) [`e1c404d`](https://github.com/gradio-app/gradio/commit/e1c404da1143fb52b659d03e028bdba1badf443d) - setup npm-previews of all packages. Thanks @pngwn!
- [#9102](https://github.com/gradio-app/gradio/pull/9102) [`efdc323`](https://github.com/gradio-app/gradio/commit/efdc3231a7bde38cfe45d10086d0d36a24c1b9b4) - Initial SSR refactor. Thanks @pngwn!

### Fixes

- [#9078](https://github.com/gradio-app/gradio/pull/9078) [`1a9d729`](https://github.com/gradio-app/gradio/commit/1a9d7297c17a3bc0493be34e8e762350ab7f0844) - Catch OSErrors in `HuggingFaceDatasetSaver._deserialize_components`. Thanks @davidberenstein1957!
- [#9088](https://github.com/gradio-app/gradio/pull/9088) [`96f8ffa`](https://github.com/gradio-app/gradio/commit/96f8ffa5eea511290f203c5d13484731e7d82387) - Set non-zero exit codes for custom component build and install commands when failures occur. Thanks @freddyaboulton!
- [#9161](https://github.com/gradio-app/gradio/pull/9161) [`173c7b8`](https://github.com/gradio-app/gradio/commit/173c7b8624371d89c40eb667bc28b9955c61b063) - Chatbot Image size and list fixes. Thanks @dawoodkhan82!
- [#9151](https://github.com/gradio-app/gradio/pull/9151) [`f1ef94a`](https://github.com/gradio-app/gradio/commit/f1ef94a435439934610497eab34201a586e418e1) - Open media type files in browser. Thanks @aliabid94!
- [#9148](https://github.com/gradio-app/gradio/pull/9148) [`8715f10`](https://github.com/gradio-app/gradio/commit/8715f103399c709717084335cfe5e971ebf9f2de) - Allow `gr.Request` to work with ZeroGPU. Thanks @abidlabs!
- [#9093](https://github.com/gradio-app/gradio/pull/9093) [`60650d8`](https://github.com/gradio-app/gradio/commit/60650d84b2cfe93fd2ebf2d2997d6c0f382d5f1a) - Reset `Dataset` page to 0 when samples change. Thanks @abidlabs!
- [#9116](https://github.com/gradio-app/gradio/pull/9116) [`ba6322e`](https://github.com/gradio-app/gradio/commit/ba6322ec2bb975f15389fe0700816bf671c6819d) - Fix image height content fit. Thanks @hannahblair!
- [#9079](https://github.com/gradio-app/gradio/pull/9079) [`d6dc384`](https://github.com/gradio-app/gradio/commit/d6dc3846fd94fe03658f0fa8219d68ddf1f7aa64) - Add more typing to event listeners. Thanks @JackismyShephard!
- [#9119](https://github.com/gradio-app/gradio/pull/9119) [`30b5d6f`](https://github.com/gradio-app/gradio/commit/30b5d6f2b75e1ff0ea03c7a6567e43a022871c9f) - Fix chatinterface multimodal bug. Thanks @freddyaboulton!
- [#8987](https://github.com/gradio-app/gradio/pull/8987) [`7b288cf`](https://github.com/gradio-app/gradio/commit/7b288cf6772ec3dc1fa603db859975e5dab90127) - Fix unexpected rendering of Dataset. Thanks @Col0ring!
- [#9089](https://github.com/gradio-app/gradio/pull/9089) [`508ac84`](https://github.com/gradio-app/gradio/commit/508ac84bc2ffbeff6daae8ae0956e14e7472c4c0) - Set orig_name in downloadbutton postprocess. Thanks @freddyaboulton!
- [#8951](https://github.com/gradio-app/gradio/pull/8951) [`6e7d9e5`](https://github.com/gradio-app/gradio/commit/6e7d9e5b848e5af8cae97a4a4f021859c423ffa4) - Deal with OAuth too many redirects. Thanks @Wauplin!

## 4.41.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Verify that you've used the correct filename of your gradio app, and that you're

---

```ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @gradio/[email protected] build:local: vite build --mode production:local --emptyOutDir "--emptyOutDir"```
```ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @self/[email protected] build:local: vite build --mode production:local --emptyOutDir "--emptyOutDir"```

Delete `/node_modules` and `pnpm-lock.yaml`:

Expand Down
Loading

0 comments on commit 981330d

Please sign in to comment.