diff --git a/.changeset/dark-rings-lie.md b/.changeset/dark-rings-lie.md new file mode 100644 index 0000000000000..afd8ea5d02b5b --- /dev/null +++ b/.changeset/dark-rings-lie.md @@ -0,0 +1,5 @@ +--- +"gradio": minor +--- + +feat:test semgrep ci diff --git a/.changeset/floppy-pandas-appear.md b/.changeset/floppy-pandas-appear.md new file mode 100644 index 0000000000000..7b9880429471c --- /dev/null +++ b/.changeset/floppy-pandas-appear.md @@ -0,0 +1,5 @@ +--- +"gradio": minor +--- + +feat:Disable sagemaker_check() for now diff --git a/.changeset/mighty-goats-dance.md b/.changeset/mighty-goats-dance.md new file mode 100644 index 0000000000000..5837c7bb9349a --- /dev/null +++ b/.changeset/mighty-goats-dance.md @@ -0,0 +1,6 @@ +--- +"@gradio/code": minor +"gradio": minor +--- + +feat:Add Jinja2 language to Code component diff --git a/.changeset/pre.json b/.changeset/pre.json index 42f847469ce00..e5882d37ef6cf 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -84,6 +84,7 @@ "beige-houses-shine", "breezy-olives-wonder", "bright-apes-fly", + "brown-queens-begin", "busy-jokes-sit", "busy-tools-chew", "calm-jobs-hope", @@ -91,7 +92,9 @@ "calm-planets-send", "chatty-houses-do", "chilly-places-sniff", + "chilly-socks-poke", "chubby-hairs-beam", + "clean-pigs-arrive", "cold-lies-mate", "cruel-heads-hunt", "cuddly-queens-melt", @@ -102,6 +105,7 @@ "deep-bananas-switch", "deep-memes-cheat", "deep-ways-wink", + "dirty-lions-follow", "dirty-pugs-hunt", "dry-frogs-argue", "dull-plants-trade", @@ -117,17 +121,19 @@ "gold-bats-return", "green-pigs-wonder", "green-wasps-invent", + "heavy-goats-grab", "honest-plums-peel", "huge-corners-tease", "hungry-dragons-drum", "hungry-tips-sin", "khaki-ducks-stare", + "khaki-ways-agree", "legal-masks-pay", "light-bats-arrive", "long-donkeys-hang", "lovely-ties-live", "lucky-hotels-sort", - "metal-nights-march", + "many-moons-like", "modern-baboons-swim", "nasty-moments-mix", "nasty-zebras-cheat", @@ -142,7 +148,6 @@ "pretty-hairs-rest", "proud-memes-fold", "public-baboons-dig", - "public-webs-melt", "puny-bats-smell", "red-brooms-bow", "rich-crews-suffer", @@ -154,6 +159,7 @@ "seven-deer-occur", "sharp-bikes-sleep", "shy-foxes-flow", + "silent-moose-push", "silly-chefs-marry", "six-bobcats-cry", "social-lizards-tickle", @@ -168,20 +174,25 @@ "tame-zoos-care", "thick-geese-divide", "thick-wasps-love", + "thin-boxes-matter", + "thirty-cloths-taste", "three-toys-knock", "tidy-bobcats-marry", "tired-moons-tell", "tough-rooms-flash", "true-pigs-build", + "two-geckos-accept", "warm-lemons-mate", "weak-glasses-enter", "wet-memes-smash", + "wicked-snails-drum", "wicked-swans-wink", "wide-dodos-peel", "witty-rice-fix", "witty-worlds-grin", "young-candles-stare", "young-ears-vanish", + "young-memes-shake", "yummy-weeks-learn" ] } diff --git a/.changeset/smooth-places-walk.md b/.changeset/smooth-places-walk.md new file mode 100644 index 0000000000000..f6066cfa90a7e --- /dev/null +++ b/.changeset/smooth-places-walk.md @@ -0,0 +1,6 @@ +--- +"@gradio/dropdown": minor +"gradio": minor +--- + +feat:Fix single select dropdown diff --git a/.changeset/stupid-memes-turn.md b/.changeset/stupid-memes-turn.md new file mode 100644 index 0000000000000..454d81d7a5ddb --- /dev/null +++ b/.changeset/stupid-memes-turn.md @@ -0,0 +1,6 @@ +--- +"@gradio/nativeplot": minor +"gradio": minor +--- + +feat:Hide x axis labels diff --git a/.changeset/tall-impalas-reply.md b/.changeset/tall-impalas-reply.md new file mode 100644 index 0000000000000..1347dc1ad5506 --- /dev/null +++ b/.changeset/tall-impalas-reply.md @@ -0,0 +1,5 @@ +--- +"website": minor +--- + +feat:Use latest lite wheel on website diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 03c1c4dbe62d8..69cd6e0d90168 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -1,4 +1,4 @@ -name: Semgrep +name: semgrep ci on: workflow_run: @@ -43,9 +43,7 @@ jobs: with: repository: ${{ steps.json.outputs.source_repo }} ref: ${{ steps.json.outputs.sha }} - - run: semgrep ci - env: - SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN2 }} + - run: semgrep ci --config .github/workflows/semgrep_rules.yaml update-status: permissions: actions: read diff --git a/.github/workflows/semgrep_rules.yaml b/.github/workflows/semgrep_rules.yaml new file mode 100644 index 0000000000000..4eab4c635136b --- /dev/null +++ b/.github/workflows/semgrep_rules.yaml @@ -0,0 +1,18 @@ +rules: + - id: detect-os-system-calls + pattern: os.system(...) + message: "Unsafe use of os.system(). Consider using subprocess.run() instead." + languages: [python] + severity: WARNING + + - id: detect-sql-injection + pattern: 'execute("SELECT * FROM " + $TABLE)' + message: "Potential SQL injection detected. Use parameterized queries." + languages: [python] + severity: ERROR + + - id: detect-eval-usage + pattern: eval(...) + message: "Use of eval() detected. This can be dangerous if used with untrusted input." + languages: [python] + severity: ERROR diff --git a/.github/workflows/trigger-semgrep.yml b/.github/workflows/trigger-semgrep.yml index 08951f1f25298..41fdff97f91a4 100644 --- a/.github/workflows/trigger-semgrep.yml +++ b/.github/workflows/trigger-semgrep.yml @@ -1,4 +1,4 @@ -name: trigger-changeset +name: trigger-semgrep on: pull_request: branches: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2690ae893d494..ec0a79687fdc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # gradio +## 5.0.0-beta.6 + +### Features + +- [#9460](https://github.com/gradio-app/gradio/pull/9460) [`7352a89`](https://github.com/gradio-app/gradio/commit/7352a89722da91461c32fd33588531f3edce9c48) - Playground requirements tab. Thanks @whitphx! +- [#9496](https://github.com/gradio-app/gradio/pull/9496) [`1647ebd`](https://github.com/gradio-app/gradio/commit/1647ebddc3e2ed6fc143a62629409e32afcc5801) - UI theme fixes. Thanks @aliabid94! +- [#9450](https://github.com/gradio-app/gradio/pull/9450) [`991883e`](https://github.com/gradio-app/gradio/commit/991883e217dc0a3512b3ae3245378812f373b8db) - Improve `gr.Code`. Thanks @hannahblair! +- [#9504](https://github.com/gradio-app/gradio/pull/9504) [`d054262`](https://github.com/gradio-app/gradio/commit/d054262f611d5f1eb1a1c936db7152347a891f8e) - Centre components within `Block` when height and width are set. Thanks @hannahblair! +- [#9481](https://github.com/gradio-app/gradio/pull/9481) [`2510a6e`](https://github.com/gradio-app/gradio/commit/2510a6e978a49432d7820e9518f164a70cf8acc8) - Fix `slider-color` var. Thanks @hannahblair! +- [#9495](https://github.com/gradio-app/gradio/pull/9495) [`488ef76`](https://github.com/gradio-app/gradio/commit/488ef768ccc5008401f7e0aa4c357b93311190ff) - Fix custom component CLI unit tests. Thanks @freddyaboulton! +- [#9488](https://github.com/gradio-app/gradio/pull/9488) [`4e6a47f`](https://github.com/gradio-app/gradio/commit/4e6a47f5a29cb885d5bc01a79ca4cc45d298f0b1) - Fixes: Chatbot examples for custom chatbot + rename `suggestions` -> `examples`. Thanks @dawoodkhan82! +- [#9506](https://github.com/gradio-app/gradio/pull/9506) [`861f5e9`](https://github.com/gradio-app/gradio/commit/861f5e97ffde5f59e42cfa213364f19e84d799fd) - Fix node process to run with correct server name. Thanks @abidlabs! +- [#9493](https://github.com/gradio-app/gradio/pull/9493) [`c307a0c`](https://github.com/gradio-app/gradio/commit/c307a0c9b81b66bde21f0af4a9f7d5726ea7a30d) - Minor fixes to docs and a demo. Thanks @abidlabs! +- [#9519](https://github.com/gradio-app/gradio/pull/9519) [`0ab6ac5`](https://github.com/gradio-app/gradio/commit/0ab6ac5dc01b69e4f2462d00c4910f3354441227) - Fix change triggers for dropdown and radio. Thanks @dawoodkhan82! + +### Fixes + +- [#9431](https://github.com/gradio-app/gradio/pull/9431) [`7065e11`](https://github.com/gradio-app/gradio/commit/7065e11e465fcdfe14688bd6ca2aeed0a25fcc36) - Check for `file_types` parameter in the backend. Thanks @dawoodkhan82! + ## 5.0.0-beta.5 ### Features diff --git a/client/python/CHANGELOG.md b/client/python/CHANGELOG.md index 16b8d06ebb881..37e2c25237940 100644 --- a/client/python/CHANGELOG.md +++ b/client/python/CHANGELOG.md @@ -1,5 +1,11 @@ # gradio_client +## 1.4.0-beta.3 + +### Fixes + +- [#9431](https://github.com/gradio-app/gradio/pull/9431) [`7065e11`](https://github.com/gradio-app/gradio/commit/7065e11e465fcdfe14688bd6ca2aeed0a25fcc36) - Check for `file_types` parameter in the backend. Thanks @dawoodkhan82! + ## 1.4.0-beta.2 ### Features diff --git a/client/python/gradio_client/CHANGELOG.md b/client/python/gradio_client/CHANGELOG.md index 16b8d06ebb881..37e2c25237940 100644 --- a/client/python/gradio_client/CHANGELOG.md +++ b/client/python/gradio_client/CHANGELOG.md @@ -1,5 +1,11 @@ # gradio_client +## 1.4.0-beta.3 + +### Fixes + +- [#9431](https://github.com/gradio-app/gradio/pull/9431) [`7065e11`](https://github.com/gradio-app/gradio/commit/7065e11e465fcdfe14688bd6ca2aeed0a25fcc36) - Check for `file_types` parameter in the backend. Thanks @dawoodkhan82! + ## 1.4.0-beta.2 ### Features diff --git a/client/python/gradio_client/package.json b/client/python/gradio_client/package.json index 05b99d9a9719f..b452ccebc94a4 100644 --- a/client/python/gradio_client/package.json +++ b/client/python/gradio_client/package.json @@ -1,6 +1,6 @@ { "name": "gradio_client", - "version": "1.4.0-beta.2", + "version": "1.4.0-beta.3", "description": "", "python": "true", "main_changeset": true, diff --git a/gradio/CHANGELOG.md b/gradio/CHANGELOG.md index 8b87ef5c90fdc..ec0a79687fdc5 100644 --- a/gradio/CHANGELOG.md +++ b/gradio/CHANGELOG.md @@ -1,5 +1,24 @@ # gradio +## 5.0.0-beta.6 + +### Features + +- [#9460](https://github.com/gradio-app/gradio/pull/9460) [`7352a89`](https://github.com/gradio-app/gradio/commit/7352a89722da91461c32fd33588531f3edce9c48) - Playground requirements tab. Thanks @whitphx! +- [#9496](https://github.com/gradio-app/gradio/pull/9496) [`1647ebd`](https://github.com/gradio-app/gradio/commit/1647ebddc3e2ed6fc143a62629409e32afcc5801) - UI theme fixes. Thanks @aliabid94! +- [#9450](https://github.com/gradio-app/gradio/pull/9450) [`991883e`](https://github.com/gradio-app/gradio/commit/991883e217dc0a3512b3ae3245378812f373b8db) - Improve `gr.Code`. Thanks @hannahblair! +- [#9504](https://github.com/gradio-app/gradio/pull/9504) [`d054262`](https://github.com/gradio-app/gradio/commit/d054262f611d5f1eb1a1c936db7152347a891f8e) - Centre components within `Block` when height and width are set. Thanks @hannahblair! +- [#9481](https://github.com/gradio-app/gradio/pull/9481) [`2510a6e`](https://github.com/gradio-app/gradio/commit/2510a6e978a49432d7820e9518f164a70cf8acc8) - Fix `slider-color` var. Thanks @hannahblair! +- [#9495](https://github.com/gradio-app/gradio/pull/9495) [`488ef76`](https://github.com/gradio-app/gradio/commit/488ef768ccc5008401f7e0aa4c357b93311190ff) - Fix custom component CLI unit tests. Thanks @freddyaboulton! +- [#9488](https://github.com/gradio-app/gradio/pull/9488) [`4e6a47f`](https://github.com/gradio-app/gradio/commit/4e6a47f5a29cb885d5bc01a79ca4cc45d298f0b1) - Fixes: Chatbot examples for custom chatbot + rename `suggestions` -> `examples`. Thanks @dawoodkhan82! +- [#9506](https://github.com/gradio-app/gradio/pull/9506) [`861f5e9`](https://github.com/gradio-app/gradio/commit/861f5e97ffde5f59e42cfa213364f19e84d799fd) - Fix node process to run with correct server name. Thanks @abidlabs! +- [#9493](https://github.com/gradio-app/gradio/pull/9493) [`c307a0c`](https://github.com/gradio-app/gradio/commit/c307a0c9b81b66bde21f0af4a9f7d5726ea7a30d) - Minor fixes to docs and a demo. Thanks @abidlabs! +- [#9519](https://github.com/gradio-app/gradio/pull/9519) [`0ab6ac5`](https://github.com/gradio-app/gradio/commit/0ab6ac5dc01b69e4f2462d00c4910f3354441227) - Fix change triggers for dropdown and radio. Thanks @dawoodkhan82! + +### Fixes + +- [#9431](https://github.com/gradio-app/gradio/pull/9431) [`7065e11`](https://github.com/gradio-app/gradio/commit/7065e11e465fcdfe14688bd6ca2aeed0a25fcc36) - Check for `file_types` parameter in the backend. Thanks @dawoodkhan82! + ## 5.0.0-beta.5 ### Features @@ -135,7 +154,6 @@ - [#9189](https://github.com/gradio-app/gradio/pull/9189) [`ab142ee`](https://github.com/gradio-app/gradio/commit/ab142ee13d19070b75b5eb03efcda7193b8993c2) - Fix serialization error in curl api. Thanks @freddyaboulton! - ## 4.44.1 ### Features diff --git a/gradio/blocks.py b/gradio/blocks.py index 34c75e067afca..6188e763192bb 100644 --- a/gradio/blocks.py +++ b/gradio/blocks.py @@ -2524,7 +2524,9 @@ def reverse(text): # So we need to manually cancel them. See `self.close()`.. self.startup_events() - self.is_sagemaker = utils.sagemaker_check() + self.is_sagemaker = ( + False # TODO: fix Gradio's behavior in sagemaker and other hosted notebooks + ) if share is None: if self.is_colab: if not quiet: diff --git a/gradio/components/code.py b/gradio/components/code.py index 15806843a97ad..95f22f5ae71e8 100644 --- a/gradio/components/code.py +++ b/gradio/components/code.py @@ -29,6 +29,7 @@ class Code(Component): "html", "css", "javascript", + "jinja2", "typescript", "yaml", "dockerfile", @@ -69,6 +70,7 @@ def __init__( "html", "css", "javascript", + "jinja2", "typescript", "yaml", "dockerfile", diff --git a/gradio/components/native_plot.py b/gradio/components/native_plot.py index d85ebd436cfd1..f3da0fffddc60 100644 --- a/gradio/components/native_plot.py +++ b/gradio/components/native_plot.py @@ -55,6 +55,7 @@ def __init__( y_lim: list[float] | None = None, x_label_angle: float = 0, y_label_angle: float = 0, + x_axis_labels_visible: bool = True, caption: str | None = None, sort: Literal["x", "y", "-x", "-y"] | list[str] | None = None, height: int | None = None, @@ -90,6 +91,7 @@ def __init__( y_lim: A tuple of list containing the limits for the y-axis, specified as [y_min, y_max]. x_label_angle: The angle of the x-axis labels in degrees offset clockwise. y_label_angle: The angle of the y-axis labels in degrees offset clockwise. + x_axis_labels_visible: Whether the x-axis labels should be visible. Can be hidden when many x-axis labels are present. caption: The (optional) caption to display below the plot. sort: The sorting order of the x values, if x column is type string/category. Can be "x", "y", "-x", "-y", or list of strings that represent the order of the categories. height: The height of the plot in pixels. @@ -120,6 +122,7 @@ def __init__( self.y_lim = y_lim self.x_label_angle = x_label_angle self.y_label_angle = y_label_angle + self.x_axis_labels_visible = x_axis_labels_visible self.caption = caption self.sort = sort self.height = height diff --git a/gradio/package.json b/gradio/package.json index 7ea44401db0f3..cd25d395c5094 100644 --- a/gradio/package.json +++ b/gradio/package.json @@ -1,6 +1,6 @@ { "name": "gradio", - "version": "5.0.0-beta.5", + "version": "5.0.0-beta.6", "description": "", "python": "true" } diff --git a/js/_website/CHANGELOG.md b/js/_website/CHANGELOG.md index 33d5aab495c68..011b2ee72d02a 100644 --- a/js/_website/CHANGELOG.md +++ b/js/_website/CHANGELOG.md @@ -1,5 +1,19 @@ # website +## 0.39.0-beta.6 + +### Features + +- [#9460](https://github.com/gradio-app/gradio/pull/9460) [`7352a89`](https://github.com/gradio-app/gradio/commit/7352a89722da91461c32fd33588531f3edce9c48) - Playground requirements tab. Thanks @whitphx! +- [#9452](https://github.com/gradio-app/gradio/pull/9452) [`3ec8e63`](https://github.com/gradio-app/gradio/commit/3ec8e636766cc629444bc3cbc6b53deaf65f5ab1) - Expanding AI Playground Prompt for Qwen. Thanks @aliabd! + +### Dependency updates + +- @gradio/tabs@0.3.0-beta.3 +- @gradio/tabitem@0.3.0-beta.3 +- @gradio/code@0.10.0-beta.5 +- @gradio/paramviewer@0.4.22-beta.3 + ## 0.39.0-beta.5 ### Dependency updates diff --git a/js/_website/package.json b/js/_website/package.json index f599454e7eb68..e28513ab770a6 100644 --- a/js/_website/package.json +++ b/js/_website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "0.39.0-beta.5", + "version": "0.39.0-beta.6", "private": true, "scripts": { "dev": "pip install boto3 && python generate_jsons/generate.py && vite dev", diff --git a/js/_website/src/lib/components/Demos.svelte b/js/_website/src/lib/components/Demos.svelte index a1f63b74aa63f..0df16036ffa33 100644 --- a/js/_website/src/lib/components/Demos.svelte +++ b/js/_website/src/lib/components/Demos.svelte @@ -1,4 +1,6 @@