diff --git a/docs/Extensions.md b/docs/Extensions.md index c7d1aa36..4e59e855 100644 --- a/docs/Extensions.md +++ b/docs/Extensions.md @@ -111,14 +111,16 @@ functions are declared in the same order that they are called at generation time. """ +import gradio as gr import torch -from modules import chat +from transformers import LogitsProcessor + +from modules import chat, shared from modules.text_generation import ( decode, encode, generate_reply, ) -from transformers import LogitsProcessor params = { "display_name": "Example Extension", diff --git a/extensions/example/script.py b/extensions/example/script.py index 669749c0..b4db7102 100644 --- a/extensions/example/script.py +++ b/extensions/example/script.py @@ -7,14 +7,16 @@ functions are declared in the same order that they are called at generation time. """ +import gradio as gr import torch -from modules import chat +from transformers import LogitsProcessor + +from modules import chat, shared from modules.text_generation import ( decode, encode, generate_reply, ) -from transformers import LogitsProcessor params = { "display_name": "Example Extension",