Skip to content

Commit

Permalink
Flake8 corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarElChamaa committed Mar 16, 2024
1 parent a210b65 commit 8ca0fa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions sdk/models/model_text_conversation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import torch
from typing import Optional, Dict, Tuple
from transformers import Conversation, AutoModelForCausalLM
from sdk.options.options_tokenizer import OptionsTokenizer
from typing import Optional, Dict
from transformers import AutoModelForCausalLM
from sdk.tokenizers.tokenizer import Tokenizer
from sdk.models import Model
from sdk.options import Devices, OptionsTextConversation
Expand Down Expand Up @@ -52,7 +51,8 @@ class ModelsTextConversation(Model):

conversation_active: bool = False

def __init__(self, model_name: str, model_path: str, option: OptionsTextConversation):
def __init__(self, model_name: str, model_path: str,
option: OptionsTextConversation):
"""
Initializes the ModelsTextToImage class
:param model_name: The name of the model
Expand All @@ -72,8 +72,8 @@ def create_pipeline(self):
self.pipeline = AutoModelForCausalLM.from_pretrained(
self.model_path,
trust_remote_code=self.options.trust_remote_code,
pad_token_id=self.options.pad_token_id, # Custom pad token ID
eos_token_id=self.options.eos_token_id # Custom end-of-sequence token ID
pad_token_id=self.options.pad_token_id,
eos_token_id=self.options.eos_token_id
)

def load_model(self, option: OptionsTextConversation) -> bool:
Expand Down
3 changes: 1 addition & 2 deletions sdk/options/options_text_conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,4 @@ def __init__(self,
self.delete_conv = delete_conv
self.tokenizer_id_to_use = tokenizer_id_to_use
self.chat_id_to_use = chat_id_to_use
self.trust_remote_code = trust_remote_code

self.trust_remote_code = trust_remote_code

0 comments on commit 8ca0fa1

Please sign in to comment.