Skip to content

Commit

Permalink
Merge branch '5.0-dev' into css-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
abidlabs authored Oct 5, 2024
2 parents 33a2333 + b82aa6f commit 60c5f1c
Show file tree
Hide file tree
Showing 137 changed files with 730 additions and 82 deletions.
5 changes: 5 additions & 0 deletions .changeset/dark-rings-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:test semgrep ci
5 changes: 5 additions & 0 deletions .changeset/floppy-pandas-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:Disable sagemaker_check() for now
6 changes: 6 additions & 0 deletions .changeset/mighty-goats-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/code": minor
"gradio": minor
---

feat:Add Jinja2 language to Code component
15 changes: 13 additions & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,17 @@
"beige-houses-shine",
"breezy-olives-wonder",
"bright-apes-fly",
"brown-queens-begin",
"busy-jokes-sit",
"busy-tools-chew",
"calm-jobs-hope",
"calm-monkeys-argue",
"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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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"
]
}
6 changes: 6 additions & 0 deletions .changeset/smooth-places-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/dropdown": minor
"gradio": minor
---

feat:Fix single select dropdown
6 changes: 6 additions & 0 deletions .changeset/stupid-memes-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/nativeplot": minor
"gradio": minor
---

feat:Hide x axis labels
5 changes: 5 additions & 0 deletions .changeset/tall-impalas-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"website": minor
---

feat:Use latest lite wheel on website
6 changes: 2 additions & 4 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Semgrep
name: semgrep ci

on:
workflow_run:
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/semgrep_rules.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/trigger-semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: trigger-changeset
name: trigger-semgrep
on:
pull_request:
branches:
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions client/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions client/python/gradio_client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion client/python/gradio_client/package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
20 changes: 19 additions & 1 deletion gradio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion gradio/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions gradio/components/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Code(Component):
"html",
"css",
"javascript",
"jinja2",
"typescript",
"yaml",
"dockerfile",
Expand Down Expand Up @@ -69,6 +70,7 @@ def __init__(
"html",
"css",
"javascript",
"jinja2",
"typescript",
"yaml",
"dockerfile",
Expand Down
3 changes: 3 additions & 0 deletions gradio/components/native_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradio/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gradio",
"version": "5.0.0-beta.5",
"version": "5.0.0-beta.6",
"description": "",
"python": "true"
}
14 changes: 14 additions & 0 deletions js/_website/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion js/_website/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions js/_website/src/lib/components/Demos.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script lang="ts">
import WHEEL from "$lib/json/wheel.json";
export let name: string;
export let code: string;
export let highlighted_code: string;
Expand Down
8 changes: 8 additions & 0 deletions js/accordion/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @gradio/accordion

## 0.3.23-beta.3

### Dependency updates

- @gradio/statustracker@0.8.0-beta.3
- @gradio/column@0.2.0-beta.1
- @gradio/atoms@0.9.0-beta.3

## 0.3.23-beta.2

### Dependency updates
Expand Down
2 changes: 1 addition & 1 deletion js/accordion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gradio/accordion",
"version": "0.3.23-beta.2",
"version": "0.3.23-beta.3",
"description": "Gradio UI packages",
"type": "module",
"author": "",
Expand Down
9 changes: 9 additions & 0 deletions js/annotatedimage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @gradio/annotatedimage

## 0.8.0-beta.5

### Dependency updates

- @gradio/upload@0.13.0-beta.5
- @gradio/statustracker@0.8.0-beta.3
- @gradio/icons@0.8.0-beta.3
- @gradio/atoms@0.9.0-beta.3

## 0.8.0-beta.4

### Dependency updates
Expand Down
2 changes: 1 addition & 1 deletion js/annotatedimage/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gradio/annotatedimage",
"version": "0.8.0-beta.4",
"version": "0.8.0-beta.5",
"description": "Gradio UI packages",
"type": "module",
"author": "",
Expand Down
Loading

0 comments on commit 60c5f1c

Please sign in to comment.