Add credits

This commit is contained in:
oobabooga 2023-07-25 15:49:04 -07:00
parent 1b89c304ad
commit c2e0d46616

View file

@ -164,7 +164,10 @@ def apply_interface_values(state, use_persistent=False):
class ToolButton(gr.Button, gr.components.IOComponent):
"""Small button with single emoji as text, fits inside gradio forms"""
"""
Small button with single emoji as text, fits inside gradio forms
Copied from https://github.com/AUTOMATIC1111/stable-diffusion-webui
"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
@ -174,6 +177,9 @@ class ToolButton(gr.Button, gr.components.IOComponent):
def create_refresh_button(refresh_component, refresh_method, refreshed_args, elem_class):
"""
Copied from https://github.com/AUTOMATIC1111/stable-diffusion-webui
"""
def refresh():
refresh_method()
args = refreshed_args() if callable(refreshed_args) else refreshed_args