forgot to uncomment important stuff
Browse files- ChitChat/common/utils.py +2 -3
ChitChat/common/utils.py
CHANGED
@@ -13,8 +13,8 @@ small_model = AutoModelForCausalLM.from_pretrained(small_model_name)
|
|
13 |
small_tokenizer = AutoTokenizer.from_pretrained(default_model)
|
14 |
small_tokenizer.pad_token = small_tokenizer.eos_token
|
15 |
|
16 |
-
|
17 |
-
|
18 |
|
19 |
def getChatHistory(user):
|
20 |
if user.history is None:
|
@@ -57,7 +57,6 @@ def conversation(user, userInput):
|
|
57 |
return small_tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens = True)
|
58 |
|
59 |
def complexChat(userInput):
|
60 |
-
return "hi"
|
61 |
input_ids = large_tokenizer(userInput, return_tensors="pt").input_ids
|
62 |
outputs = large_model.generate(input_ids,
|
63 |
min_length = 10,
|
|
|
13 |
small_tokenizer = AutoTokenizer.from_pretrained(default_model)
|
14 |
small_tokenizer.pad_token = small_tokenizer.eos_token
|
15 |
|
16 |
+
large_model = T5ForConditionalGeneration.from_pretrained(large_model_name)
|
17 |
+
large_tokenizer = T5Tokenizer.from_pretrained(large_model_name)
|
18 |
|
19 |
def getChatHistory(user):
|
20 |
if user.history is None:
|
|
|
57 |
return small_tokenizer.decode(chat_history_ids[:, bot_input_ids.shape[-1]:][0], skip_special_tokens = True)
|
58 |
|
59 |
def complexChat(userInput):
|
|
|
60 |
input_ids = large_tokenizer(userInput, return_tensors="pt").input_ids
|
61 |
outputs = large_model.generate(input_ids,
|
62 |
min_length = 10,
|