Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,14 +8,14 @@ description = "A State-of-the-Art Large-scale Pretrained Response generation mod
|
|
| 8 |
examples = [["How are you?"]]
|
| 9 |
|
| 10 |
|
| 11 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 12 |
-
model = AutoModelForCausalLM.from_pretrained("
|
| 13 |
|
| 14 |
|
| 15 |
def predict(input, history=[]):
|
| 16 |
# tokenize the new input sentence
|
| 17 |
new_user_input_ids = tokenizer.encode(
|
| 18 |
-
input + tokenizer.eos_token, return_tensors="pt"
|
| 19 |
)
|
| 20 |
|
| 21 |
# append the new user input tokens to the chat history
|
|
|
|
| 8 |
examples = [["How are you?"]]
|
| 9 |
|
| 10 |
|
| 11 |
+
tokenizer = AutoTokenizer.from_pretrained("TheBloke/Llama-2-7b-Chat-GPTQ")
|
| 12 |
+
model = AutoModelForCausalLM.from_pretrained("TheBloke/Llama-2-7b-Chat-GPTQ")
|
| 13 |
|
| 14 |
|
| 15 |
def predict(input, history=[]):
|
| 16 |
# tokenize the new input sentence
|
| 17 |
new_user_input_ids = tokenizer.encode(
|
| 18 |
+
input + tokenizer.eos_token, padding_side='left', return_tensors="pt"
|
| 19 |
)
|
| 20 |
|
| 21 |
# append the new user input tokens to the chat history
|