From ca4188aabc6e03b2a4cc2d06638a9f8aa52dd67b Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 29 Jul 2023 18:57:22 -0700 Subject: [PATCH] Update the example extension --- docs/Extensions.md | 6 ++++-- extensions/example/script.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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",