{% if parent != "gradio" %}
{% else %}
{% endif %} {% if version == "main" %} {% set gradio_js = '/assets/index.js' %} {% else %} {% set gradio_js = 'https://gradio.s3-us-west-2.amazonaws.com/' + gradio_version + '/gradio.js' %} {% endif %} {% if obj['demos'] %} {% endif %}
{% if parent != "gradio"%}

{{ obj['name'] }}

{% else %}

{{ obj['name'] }}

{% endif %} {% if obj['demos'] %} {% endif %}
{% if obj['override_signature'] %}
{{ obj['override_signature'] }}
{% else %}
{{ parent }}.{{ obj["name"] }}({% for param in obj["parameters"] %}{% if "positional" in param["kind"] and "default" not in param and param["name"] != "self" %}{{ param["name"] }}, {% endif %}{% endfor %}···)
{% endif %} {% if is_component %}
{% if version=="main" %} {% else %} {% endif %}
{% endif %}

{{ obj["description"] }}


{% if is_component %}

As input: {{ obj["tags"]["preprocessing"] }}

As output: {{ obj["tags"]["postprocessing"] }}

{% if "examples-format" in obj["tags"] %}

Format expected for examples: {{ obj["tags"]["examples-format"] }}

{% endif %} {% if obj["events"]|length > 0 %}

Supported events: {{ obj["events"] }}

{% endif %} {% endif %} {% if obj["example"] %}

Example Usage

{{ obj["example"] }}
{% if obj["demos"] %} {% endif %} {% elif obj["demos"] %}
{{ obj["demos"][0][1] }}
{% endif %} {% if (obj["parameters"]|length > 0 and obj["parameters"][0]["name"] != "self") or obj["parameters"]|length > 1 %} {% for param in obj["parameters"] %} {% if param["name"] != "self" %} {% endif %} {% endfor %}
Parameter Description
{{ param["name"] }}

{{ param["annotation"] }}

{% if "default" in param %}

default: {{ param["default"] }}

{% elif "kwargs" not in param %}

required

{% endif %}

{{ param["doc"] or "" }}

{%endif%} {% if is_component and obj["string_shortcuts"] %} {% for name, shortcut, settings in obj["string_shortcuts"] %} {% endfor %}
Class Interface String Shortcut Initialization

gradio.{{ name }}

"{{ shortcut }}"

{{ settings }}
{% endif %} {% if "fns" in obj and obj["fns"]|length %}

Methods

{% for fn in obj["fns"] %} {% with obj=fn, is_class=False, is_component=False, parent=parent + "." + obj["name"] %} {% include "docs/obj_doc_template.html" %} {% endwith %} {% endfor %}
{% endif %} {% if is_class %}

Step-by-step Guides

{% if obj["guides"] %}
{% for guide in obj["guides"] %}

{{ guide.pretty_name }}

{% endfor %}
{% else %}

No guides yet, contribute a guide about {{ obj["name"] }}

{% endif %} {% endif %}