Skip to content

Commit

Permalink
Add gradio_client changes
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyaboulton committed Jul 17, 2023
1 parent 9a0f7f9 commit 5022927
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions client/python/gradio_client/serializing.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,6 @@ def deserialize(
"lineplot": JSONSerializable,
"scatterplot": JSONSerializable,
"markdown": StringSerializable,
"dataset": StringSerializable,
"code": StringSerializable,
"interpretation": SimpleSerializable,
"annotatedimage": JSONSerializable,
}
4 changes: 3 additions & 1 deletion client/python/gradio_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
CONFIG_URL = "config"
API_INFO_URL = "info"
RAW_API_INFO_URL = "info?serialize=False"
SPACE_FETCHER_URL = "https://freddyaboulton-space-api-fetcher.hf.space/api"
SPACE_FETCHER_URL = "https://gradio-space-api-fetcher-v2.hf.space/api"
RESET_URL = "reset"
SPACE_URL = "https://hf.space/{}"

Expand All @@ -46,6 +46,8 @@
"form",
"accordion",
"group",
"interpretation",
"dataset",
}
STATE_COMPONENT = "state"
INVALID_RUNTIME = [
Expand Down
4 changes: 1 addition & 3 deletions client/python/test/test_serializing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ def test_duplicate(serializer_class):
def test_check_component_fallback_serializers():
for component_name, class_type in COMPONENT_MAPPING.items():
# skip components that cannot be instantiated without parameters
if component_name in ["dataset", "interpretation"] + list(
SKIP_COMPONENTS - {"state"}
):
if component_name in SKIP_COMPONENTS:
continue
component = components.get_component_instance(component_name)
assert isinstance(component, class_type)
Expand Down

0 comments on commit 5022927

Please sign in to comment.