Skip to content

Commit

Permalink
Sort the imports
Browse files Browse the repository at this point in the history
  • Loading branch information
oobabooga committed Mar 17, 2023
1 parent 7d97287 commit a717fd7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions modules/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import modules.shared as shared


# Copied from https://github.com/PygmalionAI/gradio-ui/
class _SentinelTokenStoppingCriteria(transformers.StoppingCriteria):

Expand Down
3 changes: 2 additions & 1 deletion modules/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import modules.shared as shared
from modules.extensions import apply_extensions
from modules.html_generator import generate_chat_html
from modules.text_generation import encode, generate_reply, get_max_prompt_length
from modules.text_generation import (encode, generate_reply,
get_max_prompt_length)


# This gets the new line characters right.
Expand Down
3 changes: 1 addition & 2 deletions modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
import torch
import transformers
from accelerate import infer_auto_device_map, init_empty_weights
from peft import PeftModel
from transformers import (AutoConfig, AutoModelForCausalLM, AutoTokenizer,
BitsAndBytesConfig)

from peft import PeftModel

import modules.shared as shared

transformers.logging.set_verbosity_error()
Expand Down
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import modules.shared as shared
import modules.ui as ui
from modules.html_generator import generate_chat_html
from modules.LoRA import add_lora_to_model
from modules.models import load_model, load_soft_prompt
from modules.text_generation import generate_reply
from modules.LoRA import add_lora_to_model

# Loading custom settings
settings_file = None
Expand Down

0 comments on commit a717fd7

Please sign in to comment.