# UI Layout

### 1. Create

Create a new example file:

```
facefusion/uis/layouts/example.py
```

### 2. Implement

Implement the hooks of the UI layout:

```python
import gradio

from facefusion.uis.components import example


def pre_check() -> bool:
	return True


def render() -> gradio.Blocks:
	with gradio.Blocks() as layout:
		example.render()
	return layout


def listen() -> None:
	example.listen()


def run(ui : gradio.Blocks) -> None:
	ui.launch()
```

### 3. Done

Finally, run the program:

```
python run.py --ui-layouts example
```
