Fixes to view API page (#4112)

* logo

* fix for new info and logo path

* changelog

* remove example_input from returns

---------

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
This commit is contained in:
Abubakar Abid 2023-05-08 22:35:46 -05:00 committed by GitHub
parent a3a34697ad
commit f1703d5f53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -14,6 +14,7 @@
- Soft theme label color fix by [@aliabid94](https://github.com/aliabid94) in [PR 4070](https://github.com/gradio-app/gradio/pull/4070)
- Fix `gr.Slider` `release` event not triggering on mobile by [@space-nuko](https://github.com/space-nuko) in [PR 4098](https://github.com/gradio-app/gradio/pull/4098)
- Removes extraneous `State` component info from the `/info` route by [@abidlabs](https://github.com/freddyaboulton) in [PR 4107](https://github.com/gradio-app/gradio/pull/4107)
- Fixes to view API page by [@abidlabs](https://github.com/abidlabs) and [@aliabd](https://github.com/aliabd) in [PR 4112](https://github.com/gradio-app/gradio/pull/4112)
- Make .then() work even if first event fails by [@aliabid94](https://github.com/aliabid94) in [PR 4115](https://github.com/gradio-app/gradio/pull/4115).
## Documentation Changes:

View File

@ -22,7 +22,7 @@
import type { ThemeMode } from "./components/types";
import logo from "./images/logo.svg";
import api_logo from "/static/img/api-logo.svg";
import api_logo from "./api_docs/img/api-logo.svg";
setupi18n();

View File

@ -40,11 +40,11 @@
client = Client(<span class="token string">"{root}"</span>)
result = client.predict(<!--
-->{#each endpoint_parameters as { label, type_python, type_description, component, example_input }, i}<!--
-->{#each endpoint_parameters as { label, type, python_type, component, example_input, serializer }, i}<!--
-->
<span
class="example-inputs"
>{represent_value(example_input, type_python, "py")}</span
>{represent_value(example_input, python_type.type, "py")}</span
>,<!--
-->{#if dependency_failures[dependency_index][i]}<!--
--><span
@ -53,8 +53,8 @@ result = client.predict(<!--
-->{/if}<!--
--><span class="desc"
><!--
--> # {type_python} <!--
-->representing {type_description} in '{label}' <!--
--> # {python_type.type} <!--
-->representing input in '{label}' <!--
-->{component} component<!--
--></span
><!--

View File

@ -33,13 +33,13 @@
<div class="response-wrap">
<div class:hide={is_running}>
{#if endpoint_returns.length > 1}({/if}
{#each endpoint_returns as { label, type_python, type_description, component }}
{#each endpoint_returns as { label, type, python_type, component, serializer }}
<div class:second-level={endpoint_returns.length > 1}>
<span class="desc"
><!--
--> # {type_python}
--> # {python_type.type}
<!--
-->representing {type_description} in '{label}' <!--
-->representing output in '{label}' <!--
-->{component}
component<!--
--></span