Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dawoodkhan82 committed Jan 31, 2024
2 parents 3e7488f + 60078df commit 0e9a4b7
Show file tree
Hide file tree
Showing 245 changed files with 2,890 additions and 611 deletions.
7 changes: 7 additions & 0 deletions .changeset/angry-onions-hope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@gradio/app": minor
"@gradio/simpleimage": minor
"gradio": minor
---

feat:Add a `simpleimage` template for custom components
5 changes: 0 additions & 5 deletions .changeset/big-bananas-sell.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/big-bears-cover.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clean-sheep-drive.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/cold-trees-wash.md

This file was deleted.

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

fix:Add missing parameters and docstrings for `gr.TabbedInterface`
6 changes: 6 additions & 0 deletions .changeset/eager-rivers-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/upload": patch
"gradio": patch
---

feat:Upload tweak
6 changes: 6 additions & 0 deletions .changeset/easy-flowers-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"gradio": patch
"gradio_client": patch
---

fix:Optimize client view_api method
6 changes: 6 additions & 0 deletions .changeset/every-bears-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/audio": patch
"gradio": patch
---

fix:Fix audio recording events not dispatching
5 changes: 0 additions & 5 deletions .changeset/famous-mammals-attend.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/famous-socks-clap.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/flat-suns-cry.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/fuzzy-windows-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/accordion": minor
"gradio": minor
---

feat:Ensure `open` reactivity in Accordion
6 changes: 6 additions & 0 deletions .changeset/happy-hairs-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/simpleimage": patch
"gradio": patch
---

feat:Fix SimpleImage package json
8 changes: 0 additions & 8 deletions .changeset/hot-forks-report.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/lazy-things-accept.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/lemon-tips-switch.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/lovely-mammals-refuse.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/lucky-tips-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/app": patch
"gradio": patch
---

fix:add background color based on the OS mode
5 changes: 0 additions & 5 deletions .changeset/major-owls-melt.md

This file was deleted.

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

feat:Defer importing matplotlib
5 changes: 0 additions & 5 deletions .changeset/petite-islands-follow.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/puny-meals-behave.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/red-squids-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/file": patch
"gradio": patch
---

fix:Fix single file upload display
6 changes: 6 additions & 0 deletions .changeset/ripe-emus-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/dataframe": minor
"gradio": minor
---

feat:Allow selecting texts in dataframe cells
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"gradio": patch
---

fix:Ensure microphone devices list updates
fix:Amend audio waveform colour
6 changes: 0 additions & 6 deletions .changeset/silent-lions-train.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/strong-bugs-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": patch
---

feat:Fix test requirements to be compatible with python 3.11
5 changes: 0 additions & 5 deletions .changeset/sweet-doodles-cheer.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/thick-grapes-shine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/imageeditor": patch
"gradio": patch
---

fix:Show label in interactive image editor
6 changes: 6 additions & 0 deletions .changeset/true-pears-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@gradio/tabitem": patch
"gradio": patch
---

fix:Add `visible` check to Tab
23 changes: 23 additions & 0 deletions .changeset/warm-jokes-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
"@gradio/audio": patch
"@gradio/checkbox": patch
"@gradio/code": patch
"@gradio/colorpicker": patch
"@gradio/dataset": patch
"@gradio/dropdown": patch
"@gradio/file": patch
"@gradio/fileexplorer": patch
"@gradio/image": patch
"@gradio/markdown": patch
"@gradio/model3d": patch
"@gradio/number": patch
"@gradio/radio": patch
"@gradio/simpledropdown": patch
"@gradio/simpleimage": patch
"@gradio/simpletextbox": patch
"@gradio/textbox": patch
"@gradio/video": patch
"gradio": patch
---

fix:Handle the case where examples is `null` for all components
6 changes: 0 additions & 6 deletions .changeset/weak-streets-check.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/wise-moments-agree.md

This file was deleted.

3 changes: 2 additions & 1 deletion .config/playwright-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ function spawn_gradio_app(app, port, verbose) {
env: {
...process.env,
GRADIO_SERVER_PORT: `7879`,
PYTHONUNBUFFERED: "true"
PYTHONUNBUFFERED: "true",
GRADIO_ANALYTICS_ENABLED: "False"
}
});
_process.stdout.setEncoding("utf8");
Expand Down
3 changes: 2 additions & 1 deletion .config/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export default defineConfig({
args: [
"--disable-web-security",
"--use-fake-device-for-media-stream",
"--use-fake-ui-for-media-stream"
"--use-fake-ui-for-media-stream",
"--use-file-for-fake-audio-capture=../gradio/test_data/test_audio.wav"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/install-frontend-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ runs:
if: steps.frontend-cache.outputs.cache-hit != 'true' || inputs.always-install-pnpm == 'true'
uses: pnpm/action-setup@v2
with:
version: 8.9
version: 8.15
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
if: steps.frontend-cache.outputs.cache-hit != 'true'
uses: pnpm/action-setup@v2
with:
version: 8
version: 8.15
- uses: actions/setup-node@v4
if: steps.frontend-cache.outputs.cache-hit != 'true'
with:
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
if: steps.frontend-cache.outputs.cache-hit != 'true'
uses: pnpm/action-setup@v2
with:
version: 8
version: 8.15
- uses: actions/setup-node@v4
if: steps.frontend-cache.outputs.cache-hit != 'true'
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
version: 8.15
- uses: actions/setup-node@v4
with:
node-version: 18
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# gradio

## 4.16.0

### Features

- [#7124](https://github.com/gradio-app/gradio/pull/7124) [`21a16c6`](https://github.com/gradio-app/gradio/commit/21a16c60e8f34b870bd2aae9af07713eb1307252) - add params to `gr.Interface` and `gr.ChatInterface`. Thanks [@abidlabs](https://github.com/abidlabs)!
- [#7139](https://github.com/gradio-app/gradio/pull/7139) [`6abad53`](https://github.com/gradio-app/gradio/commit/6abad536778517a2ab9f5fc75d52afc576f01218) - Added polars dataframe support with demo. Thanks [@cswamy](https://github.com/cswamy)!
- [#7084](https://github.com/gradio-app/gradio/pull/7084) [`94aa271`](https://github.com/gradio-app/gradio/commit/94aa271ab11fc3426a7e143ebaa757eb30c9911d) - Improve rapid generation performance via UI throttling. Thanks [@aliabid94](https://github.com/aliabid94)!
- [#7104](https://github.com/gradio-app/gradio/pull/7104) [`bc2cdc1`](https://github.com/gradio-app/gradio/commit/bc2cdc1df95b38025486cf76df4a494b66d98585) - Allow download button for interactive Audio and Video components. Thanks [@hannahblair](https://github.com/hannahblair)!
- [#7109](https://github.com/gradio-app/gradio/pull/7109) [`125a832`](https://github.com/gradio-app/gradio/commit/125a832ab7ee2b5affa574e8b32c88f430cc6663) - generate docs when running `gradio cc build`. Thanks [@pngwn](https://github.com/pngwn)!
- [#7148](https://github.com/gradio-app/gradio/pull/7148) [`c60ad4d`](https://github.com/gradio-app/gradio/commit/c60ad4d34ab5b56a89bf6796822977e51e7a4a32) - Use Gallery as input component. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
- [#7049](https://github.com/gradio-app/gradio/pull/7049) [`1718c4a`](https://github.com/gradio-app/gradio/commit/1718c4aeb23a88ef02b17b30a1d1cb72e413e04a) - add STL 3D model support. Thanks [@Mon-ius](https://github.com/Mon-ius)!
- [#7159](https://github.com/gradio-app/gradio/pull/7159) [`6ee22dc`](https://github.com/gradio-app/gradio/commit/6ee22dc6a8f6419e127a0f650e58c87a31bc59c9) - Ensure `gradio cc publish` uploads the documentation space, if it exists. Thanks [@pngwn](https://github.com/pngwn)!
- [#7034](https://github.com/gradio-app/gradio/pull/7034) [`82fe73d`](https://github.com/gradio-app/gradio/commit/82fe73d04297ac4e2c3ef42edc62bab4300bf915) - Redirect with query params after oauth. Thanks [@Wauplin](https://github.com/Wauplin)!
- [#7063](https://github.com/gradio-app/gradio/pull/7063) [`2cdcf4a`](https://github.com/gradio-app/gradio/commit/2cdcf4a890202a55673588c16f27b327d27915b6) - Single oauth button. Thanks [@Wauplin](https://github.com/Wauplin)!

### Fixes

- [#7126](https://github.com/gradio-app/gradio/pull/7126) [`5727b92`](https://github.com/gradio-app/gradio/commit/5727b92abc8a00a675bfc0a921b38de771af947b) - Allow buttons to take null value. Thanks [@abidlabs](https://github.com/abidlabs)!
- [#7112](https://github.com/gradio-app/gradio/pull/7112) [`217bfe3`](https://github.com/gradio-app/gradio/commit/217bfe39ca6a0de885824f16be4a707e7f032d57) - Support audio data in `np.int8` format in the `gr.Audio` component. Thanks [@Ram-Pasupula](https://github.com/Ram-Pasupula)!
- [#7029](https://github.com/gradio-app/gradio/pull/7029) [`ac73555`](https://github.com/gradio-app/gradio/commit/ac735551bb2ccc288b2bbf10b008b6c3d9e65132) - Run before_fn and after_fn for each generator iteration. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
- [#7131](https://github.com/gradio-app/gradio/pull/7131) [`7d53aa1`](https://github.com/gradio-app/gradio/commit/7d53aa13a304d056d1973b8e86c6f89ff84cbd28) - Miscellaneous doc fixes. Thanks [@abidlabs](https://github.com/abidlabs)!
- [#7138](https://github.com/gradio-app/gradio/pull/7138) [`ca8753b`](https://github.com/gradio-app/gradio/commit/ca8753bb3d829d0077f758ba8d0ddc866ff74d3d) - Fixes: Chatbot crashes when given empty url following http:// or https://. Thanks [@dawoodkhan82](https://github.com/dawoodkhan82)!
- [#7115](https://github.com/gradio-app/gradio/pull/7115) [`cb90b3d`](https://github.com/gradio-app/gradio/commit/cb90b3d5d6a291270e047e10f9173cbc03678e1c) - Programmatically determine max wheel version to push to spaces. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
- [#7107](https://github.com/gradio-app/gradio/pull/7107) [`80f8fbf`](https://github.com/gradio-app/gradio/commit/80f8fbf0e8900627b9c2575bbd7c68fad8108544) - Add logic to handle non-interactive or hidden tabs. Thanks [@hannahblair](https://github.com/hannahblair)!
- [#7142](https://github.com/gradio-app/gradio/pull/7142) [`b961652`](https://github.com/gradio-app/gradio/commit/b9616528ab099aab0adc7027bce4655111f7366c) - Remove kwargs from template components. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
- [#7125](https://github.com/gradio-app/gradio/pull/7125) [`45f725f`](https://github.com/gradio-app/gradio/commit/45f725f8d0dc7813b3d2e768ca9582d6ad878d6f) - un-disable output components after exception is raised. Thanks [@abidlabs](https://github.com/abidlabs)!
- [#7081](https://github.com/gradio-app/gradio/pull/7081) [`44c53d9`](https://github.com/gradio-app/gradio/commit/44c53d9bde7cab605b7dbd16331683d13cae029e) - Fix dropdown refocusing due to `<label />` element. Thanks [@hannahblair](https://github.com/hannahblair)!
- [#7130](https://github.com/gradio-app/gradio/pull/7130) [`e7ab406`](https://github.com/gradio-app/gradio/commit/e7ab4063eb2624820b9f1076960e9596791d9427) - Fix ParamViewer css. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
- [#7113](https://github.com/gradio-app/gradio/pull/7113) [`28e8a8a`](https://github.com/gradio-app/gradio/commit/28e8a8a3ec8acd653182577273be4244a4817082) - Reduce CPU usage of dev mode. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
- [#7082](https://github.com/gradio-app/gradio/pull/7082) [`c35fac0`](https://github.com/gradio-app/gradio/commit/c35fac049a44b14719509443c68690e7f23ce70d) - Ensure device selection works in Audio when streaming. Thanks [@hannahblair](https://github.com/hannahblair)!
- [#7045](https://github.com/gradio-app/gradio/pull/7045) [`13cb6af`](https://github.com/gradio-app/gradio/commit/13cb6af8b23be063d85b2c632f36afa37d874e5d) - Ensure microphone devices list updates. Thanks [@hannahblair](https://github.com/hannahblair)!
- [#7150](https://github.com/gradio-app/gradio/pull/7150) [`be56c76`](https://github.com/gradio-app/gradio/commit/be56c76c7b5d2814ea8239c7dbeddc4b1d3701c4) - Lite: Add the `home_dir` to `sys.path`. Thanks [@whitphx](https://github.com/whitphx)!
- [#7133](https://github.com/gradio-app/gradio/pull/7133) [`8c355a4`](https://github.com/gradio-app/gradio/commit/8c355a47844296e3aab250fe61e2ecc706122e78) - Add ruff mock for Lite. Thanks [@whitphx](https://github.com/whitphx)!
- [#6826](https://github.com/gradio-app/gradio/pull/6826) [`e8b2d8b`](https://github.com/gradio-app/gradio/commit/e8b2d8b2f81b7c4b2d107765f06eaf09a030f1df) - Add sample rate config option to `gr.Audio()`. Thanks [@tsukumijima](https://github.com/tsukumijima)!

## 4.15.0

### Highlights
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@



Gradio is an open-source Python package that allows you to quickly **build** a demo or web application for your machine learning model, API, or any arbitary Python function. You can then **share** a link to your demo or web application in just a few seconds using Gradio's built-in sharing features. *No JavaScript, CSS, or web hosting experience needed!*
Gradio is an open-source Python package that allows you to quickly **build** a demo or web application for your machine learning model, API, or any arbitrary Python function. You can then **share** a link to your demo or web application in just a few seconds using Gradio's built-in sharing features. *No JavaScript, CSS, or web hosting experience needed!*

<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/gradio-guides/lcm-screenshot-3.gif" style="padding-bottom: 10px">

Expand All @@ -43,7 +43,7 @@ pip install gradio


> [!TIP]
> it is best to install Gradio in a virtual environment. Detailed installation instructions for all common operating systems <a href="https://www.gradio.app/main/guides/installing-gradio-in-a-virtual-environment">are provided here</a>.
> It is best to install Gradio in a virtual environment. Detailed installation instructions for all common operating systems <a href="https://www.gradio.app/main/guides/installing-gradio-in-a-virtual-environment">are provided here</a>.
### Building Your First Demo

Expand Down
9 changes: 7 additions & 2 deletions client/python/gradio_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def __init__(
self.upload_url = urllib.parse.urljoin(self.src, utils.UPLOAD_URL)
self.reset_url = urllib.parse.urljoin(self.src, utils.RESET_URL)
self.app_version = version.parse(self.config.get("version", "2.0"))
self._info = self._get_api_info()
self._info = None
self.session_hash = str(uuid.uuid4())

endpoint_class = (
Expand Down Expand Up @@ -556,6 +556,8 @@ def view_api(
}
"""
if not self._info:
self._info = self._get_api_info()
num_named_endpoints = len(self._info["named_endpoints"])
num_unnamed_endpoints = len(self._info["unnamed_endpoints"])
if num_named_endpoints == 0 and all_endpoints is None:
Expand Down Expand Up @@ -1557,7 +1559,10 @@ def __next__(self) -> tuple | Any:
o = self.communicator.job.outputs[self._counter]
self._counter += 1
return o
if self.communicator.job.latest_status.code == Status.FINISHED:
if (
self.communicator.job.latest_status.code == Status.FINISHED
and self._counter >= len(self.communicator.job.outputs)
):
raise StopIteration()
time.sleep(0.001)

Expand Down
Loading

0 comments on commit 0e9a4b7

Please sign in to comment.