Spaces:
No application file
No application file
File size: 807 Bytes
3883c60 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# Your first audio-webui extension
Create a repository, or a regular folder, repositories will get automatic updates though.
Let's call it "example"
Now, lets create an **extension.json** at **example/extension.json**
```json
{
"name": "example",
"description": "An example extension for this tutorial.",
"author": "GitMylo",
"tags": []
}
```
Great! Now your extension can be loaded by audio webui, when it's in the `extensions` folder.
For this example, we will create an extension which adds a new tab to audio-webui
create a file at **example/main.py**
```python
import webui.extensionlib.callbacks as cb
import gradio
def new_tab():
with gradio.Tab('Extension tab!'):
gradio.Markdown('# This tab is created from an extension!')
cb.register_by_name('webui.tabs', new_tab)
```
|