Spaces:
Runtime error
Runtime error
Royrotem100
commited on
Commit
•
072d5f2
1
Parent(s):
d8ff35c
Initial commit
Browse files
app.py
CHANGED
@@ -15,6 +15,10 @@ model_name = "dicta-il/dictalm2.0-instruct"
|
|
15 |
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
17 |
|
|
|
|
|
|
|
|
|
18 |
History = List[Tuple[str, str]]
|
19 |
Messages = List[Dict[str, str]]
|
20 |
|
|
|
15 |
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
17 |
|
18 |
+
# Set the pad token to eos_token if not already set
|
19 |
+
if tokenizer.pad_token is None:
|
20 |
+
tokenizer.pad_token = tokenizer.eos_token
|
21 |
+
|
22 |
History = List[Tuple[str, str]]
|
23 |
Messages = List[Dict[str, str]]
|
24 |
|