mirror of
https://github.com/gradio-app/gradio.git
synced 2025-04-12 12:40:29 +08:00
Ensure gradio_client
is backwards compatible with gradio==3.24.1
(#5061)
* fix to client * add changeset * lint * add changeset * add changeset * add changeset * add changeset * pin --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
7d89716519
commit
136adc9ccb
6
.changeset/tired-regions-punch.md
Normal file
6
.changeset/tired-regions-punch.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"gradio": patch
|
||||
"gradio_client": patch
|
||||
---
|
||||
|
||||
fix:Ensure `gradio_client` is backwards compatible with `gradio==3.24.1`
|
@ -38,12 +38,14 @@ class Serializable:
|
||||
# For backwards compatibility
|
||||
def input_api_info(self) -> tuple[str, str]:
|
||||
api_info = self.api_info()
|
||||
return (api_info["serialized_input"][0], api_info["serialized_input"][1])
|
||||
types = api_info.get("serialized_input", [api_info["info"]["type"]] * 2) # type: ignore
|
||||
return (types[0], types[1])
|
||||
|
||||
# For backwards compatibility
|
||||
def output_api_info(self) -> tuple[str, str]:
|
||||
api_info = self.api_info()
|
||||
return (api_info["serialized_output"][0], api_info["serialized_output"][1])
|
||||
types = api_info.get("serialized_output", [api_info["info"]["type"]] * 2) # type: ignore
|
||||
return (types[0], types[1])
|
||||
|
||||
def serialize(self, x: Any, load_dir: str | Path = ""):
|
||||
"""
|
||||
|
@ -3,7 +3,7 @@ aiohttp~=3.0
|
||||
altair>=4.2.0,<6.0
|
||||
fastapi
|
||||
ffmpy
|
||||
gradio_client>=0.3.0
|
||||
gradio_client==0.3.0
|
||||
httpx
|
||||
huggingface_hub>=0.14.0
|
||||
importlib_resources>=1.3,<7.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user