aboutsummaryrefslogtreecommitdiff
path: root/modules/scripts.py
diff options
context:
space:
mode:
authorpieresimakp <69743585+pieresimakp@users.noreply.github.com>2023-03-27 11:53:15 +0800
committerpieresimakp <69743585+pieresimakp@users.noreply.github.com>2023-03-27 11:53:15 +0800
commit68a5604cac50c27dbacf9775c9466600dc8bf789 (patch)
treee3cd120bb5321d2856ef0b51b244c3aa083e82c1 /modules/scripts.py
parent774c691df8b99f5e24d3f41e451fe65f5b447952 (diff)
parent3b5a3fab91ff797b28239cda5b449aac1f85ad00 (diff)
Merge remote-tracking branch 'upstream/master' into pr-dev
Diffstat (limited to 'modules/scripts.py')
-rw-r--r--modules/scripts.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/scripts.py b/modules/scripts.py
index d661be4f..4d0bbd66 100644
--- a/modules/scripts.py
+++ b/modules/scripts.py
@@ -553,3 +553,15 @@ def IOComponent_init(self, *args, **kwargs):
original_IOComponent_init = gr.components.IOComponent.__init__
gr.components.IOComponent.__init__ = IOComponent_init
+
+
+def BlockContext_init(self, *args, **kwargs):
+ res = original_BlockContext_init(self, *args, **kwargs)
+
+ add_classes_to_gradio_component(self)
+
+ return res
+
+
+original_BlockContext_init = gr.blocks.BlockContext.__init__
+gr.blocks.BlockContext.__init__ = BlockContext_init