From f2a46333ef9305bb9cd1d5f426a6c20bcc0d118e Mon Sep 17 00:00:00 2001 From: Vasyanator <135327897+Vasyanator@users.noreply.github.com> Date: Tue, 27 Aug 2024 21:34:04 +0400 Subject: [PATCH] Update script.py --- extensions/example/script.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/extensions/example/script.py b/extensions/example/script.py index 44f0cb3c..10d14fe9 100644 --- a/extensions/example/script.py +++ b/extensions/example/script.py @@ -128,10 +128,31 @@ def setup(): """ pass -def ui(): +def ui_block(): """ - Gets executed when the UI is drawn. Custom gradio elements and - their corresponding event handlers should be defined here. + Gets executed when the UI is drawn. The custom gradio elements + that are used most often and their corresponding event handlers + should be defined here. + + To learn about gradio components, check out the docs: + https://gradio.app/docs/ + """ + pass + +def ui_tab(): + """ + Gets executed when the UI is drawn and creates a tab for the big UI. + Its gradio elements and corresponding event handlers should be defined here. + + To learn about gradio components, check out the docs: + https://gradio.app/docs/ + """ + pass + +def ui_params(): + """ + Executed when the user interface is rendered. Elements of the extension + settings and event handlers corresponding to them should be defined here. To learn about gradio components, check out the docs: https://gradio.app/docs/