Skip to content

Commit

Permalink
Merge branch '5.0-dev' into base-64-image
Browse files Browse the repository at this point in the history
  • Loading branch information
abidlabs authored Oct 5, 2024
2 parents cbfd5b8 + 8bcbd3f commit 630c0bd
Show file tree
Hide file tree
Showing 162 changed files with 1,337 additions and 311 deletions.
7 changes: 7 additions & 0 deletions .changeset/chilly-socks-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@gradio/code": minor
"@gradio/icons": minor
"gradio": minor
---

feat:Improve `gr.Code`
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/dirty-lions-follow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"website": minor
---

feat:Expanding AI Playground Prompt for Qwen
5 changes: 0 additions & 5 deletions .changeset/metal-nights-march.md

This file was deleted.

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"
]
}
5 changes: 0 additions & 5 deletions .changeset/public-webs-melt.md

This file was deleted.

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
5 changes: 5 additions & 0 deletions .changeset/thin-boxes-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:Fix node process to run with correct server name
7 changes: 7 additions & 0 deletions .changeset/wicked-snails-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@gradio/dropdown": minor
"@gradio/radio": minor
"gradio": minor
---

feat:Fix change triggers for dropdown and radio
62 changes: 62 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: semgrep ci

on:
workflow_run:
workflows: ["trigger-semgrep"]
types:
- completed

env:
CI: true
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"

concurrency:
group: "${{ github.event.workflow_run.head_repository.full_name }}-${{ github.event.workflow_run.head_branch }}-${{ github.workflow_ref }}"
cancel-in-progress: true

permissions: {}

jobs:
semgrep:
permissions:
contents: read
name: semgrep/ci
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
outputs:
pr_number: ${{ steps.json.outputs.pr_number }}
sha: ${{ steps.json.outputs.sha }}
if: (github.actor != 'dependabot[bot]')
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: changes
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- uses: gradio-app/github/actions/json-to-output@main
id: json
with:
path: output.json
- uses: actions/checkout@v4
with:
repository: ${{ steps.json.outputs.source_repo }}
ref: ${{ steps.json.outputs.sha }}
- run: semgrep ci --config .github/workflows/semgrep_rules.yaml
update-status:
permissions:
actions: read
statuses: write
runs-on: ubuntu-latest
needs: semgrep
steps:
- name: update status
uses: gradio-app/github/actions/commit-status@main
with:
sha: ${{ needs.semgrep.outputs.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
name: "Semgrep Results"
pr: ${{ needs.semgrep.outputs.pr_number }}
result: ${{ needs.semgrep.result == 'success' && 'success' || 'failure' }}
type: all
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
29 changes: 29 additions & 0 deletions .github/workflows/trigger-semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: trigger-semgrep
on:
pull_request:
branches:
- main
- 5.0-dev

permissions: {}

jobs:
changes:
permissions:
contents: read
pull-requests: read
name: "changes"
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.changes.outputs.should_run }}
sha: ${{ steps.changes.outputs.sha }}
pr_number: ${{ steps.changes.outputs.pr_number }}
source_branch: ${{ steps.changes.outputs.source_branch }}
source_repo: ${{ steps.changes.outputs.source_repo }}
steps:
- uses: actions/checkout@v4
- uses: "gradio-app/gradio/.github/actions/changes@main"
id: changes
with:
filter: "gradio"
token: ${{ secrets.GITHUB_TOKEN }}
28 changes: 2 additions & 26 deletions .github/workflows/website-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ jobs:
permissions:
actions: read
outputs:
vercel_url: ${{ steps.output_url.outputs.vercel_url }}
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
cloudflare_url: ${{ steps.cloudflare-preview.outputs.deployment-url }}
steps:
- name: download website artifacts
uses: actions/download-artifact@v4
Expand All @@ -67,17 +64,6 @@ jobs:
- name: list files
run: ls -R .

- name: Pull Vercel Environment Information
shell: bash
if: needs.changes.outputs.pr_number != 'false'
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_DEPLOY_TOKEN }} --cwd js/_website

- name: Deploy Project Artifacts to Vercel
if: needs.changes.outputs.pr_number != 'false'
id: output_url
shell: bash
run: echo "vercel_url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_DEPLOY_TOKEN }} --cwd js/_website)" >> $GITHUB_OUTPUT

- name: Deploy Preview Website to Cloudflare Pages
if: needs.changes.outputs.pr_number != 'false'
id: cloudflare-preview
Expand All @@ -88,16 +74,6 @@ jobs:
command: pages deploy js/_website/.vercel/output/static --project-name=gradio-website --branch=${{ needs.changes.outputs.source_branch }}

# production
- name: Pull Vercel Environment Information
if: needs.changes.outputs.source_repo == 'gradio-app/gradio' && needs.changes.outputs.source_branch == 'refs/heads/main'
shell: bash
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_DEPLOY_TOKEN }} --cwd js/_website

- name: Deploy Project Artifacts to Vercel
if: needs.changes.outputs.source_repo == 'gradio-app/gradio' && needs.changes.outputs.source_branch == 'refs/heads/main'
shell: bash
run: echo "VERCEL_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_DEPLOY_TOKEN }} --cwd js/_website)" >> $GITHUB_ENV

- name: Deploy Production Website to Cloudflare Pages
if: needs.changes.outputs.source_repo == 'gradio-app/gradio' && needs.changes.outputs.source_branch == 'refs/heads/main'
id: cloudflare-production
Expand All @@ -115,7 +91,7 @@ jobs:
gh_token: ${{ secrets.COMMENT_TOKEN }}
with:
pr_number: ${{ needs.changes.outputs.pr_number }}
message: website~success~${{needs.deploy.outputs.vercel_url}}
message: website~success~${{needs.deploy.outputs.cloudflare_url}}
comment-deploy-failure:
uses: "./.github/workflows/comment-queue.yml"
needs: [deploy, changes]
Expand Down
25 changes: 25 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 Expand Up @@ -135,6 +154,12 @@

- [#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

- [#9320](https://github.com/gradio-app/gradio/pull/9320) [`98cbcae`](https://github.com/gradio-app/gradio/commit/98cbcaef827de7267462ccba180c7b2ffb1e825d) - chore: fix docs style. Thanks @imba-tjd!

## 4.44.0

### 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
Loading

0 comments on commit 630c0bd

Please sign in to comment.