\n\t\tNo API Routes found for\n\t\t\n\t\t\t{root}\n\t\t
\n\t
\n\t\tTo expose an API endpoint of your app in this page, set the \n\t\t\tapi_name\n\t\t
\n\t\tparameter of the event listener.\n\t\t
\n\t\tFor more information, visit the\n\t\t\n\t\t\tAPI Page guide\n\t\t\n\t\t. To hide the API documentation button and this page, set\n\t\tshow_api=False
\n\t\tin the\n\t\tBlocks.launch()
\n\t\tmethod.\n\t
\n\t\t{#if current_language === \"python\"}\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t\t$ {py_install}
\n\t\t\t\n\t\t{:else if current_language === \"javascript\"}\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t\t$ {js_install}
\n\t\t\t\n\t\t{/if}\n\t
\n\n\t\t\t{#if current_language === \"python\"}\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tfrom gradio_client import Client\n\nclient = Client(\"{root}\")\nresult = client.predict({#each endpoint_parameters as { label, type, python_type, component, example_input, serializer }, i}\n\t\t\t\t{represent_value(example_input, python_type.type, \"py\")},{#if dependency_failures[dependency_index][i]}ERROR{/if}\t# {python_type.type} {#if python_type.description}({python_type.description}) {/if}in '{label}' {component} component\n\t\t\t\t\t\t{/each}\n\t\t\t\t{#if named}\n\t\t\t\t\t\t\tapi_name=\"/{dependency.api_name}\"\n\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\tfn_index={dependency_index}\n\t\t\t\t\t\t{/if}\n)\nprint(result)
\n\t\t\t\t\n\t\t\t{:else if current_language === \"javascript\"}\n\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\timport { client } from \"@gradio/client\";\n{#each blob_examples as { label, type, python_type, component, example_input, serializer }, i}\nconst response_{i} = await fetch(\"{example_input}\");\nconst example{component} = await response_{i}.blob();\n\t\t\t\t\t\t{/each}\nconst app = await client(\"{root}\");\nconst result = await app.predict({#if named}\"/{dependency.api_name}\"{:else}{dependency_index}{/if}, [{#each endpoint_parameters as { label, type, python_type, component, example_input, serializer }, i}{#if blob_components.includes(component)}\n\t\t\t\texample{component}, \t// blob in '{label}' {component} component{:else}\t\t\n\t\t\t\t{represent_value(\n\t\t\t\t\t\t\t\t\t\texample_input,\n\t\t\t\t\t\t\t\t\t\tpython_type.type,\n\t\t\t\t\t\t\t\t\t\t\"js\"\n\t\t\t\t\t\t\t\t\t)}, // {js_parameters[i]\n\t\t\t\t\t\t\t\t\t\t.type} {#if js_parameters[i].description}({js_parameters[i]\n\t\t\t\t\t\t\t\t\t\t\t.description}){/if} in '{label}' {component} component{/if}\n\t\t\t\t\t\t{/each}\n\t]);\n\nconsole.log(result.data);\n
\n\t\t\t\t\n\t\t\t{/if}\n\t\t
\n\t\n\t\t\t\t\tUse the gradio_client
\n\t\t\t\t\tPython library or the\n\t\t\t\t\t@gradio/client
Javascript package to query the demo via API.\n\t\t\t\t