# Gradio Blocks Python \<-\> JS / Svelte

**URL:** <https://discuss.huggingface.co/t/gradio-blocks-python-js-svelte/44676>\
**Category:** 🔒 Gradio\
**Created:** [June 27, 2023, 3:50am UTC](https://discuss.huggingface.co/t/gradio-blocks-python-js-svelte/44676 "2023-06-27T03:50:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeromeku](https://avatars.discourse-cdn.com/v4/letter/j/6bbea6/32.png) [@jeromeku](https://discuss.huggingface.co/u/jeromeku)\
**Post date:** [June 27, 2023, 3:50am UTC](https://discuss.huggingface.co/t/gradio-blocks-python-js-svelte/44676/1 "2023-06-27T03:50:30Z")

</div>

When using the gradio.Blocks() interface to create an app, when are the app components injected into either the template (i.e., `share.html` or `index.html`)?

Trying to understand how Python communicates with JS / Svelte to create interactive frontend. From what I can tell, calling the `launch` method of a `blocks` interface creates a FastAPI app that serves a gradio template as the homepage which has a placeholder tag `gradio-app` for hydrating with the actual components.

However, having trouble identifying where the serialization of Python components to JS/Svelte components is happening within the codebase.
