Spaces:
Sleeping
Sleeping
Update crypto_analysis_agents.py
Browse files
crypto_analysis_agents.py
CHANGED
@@ -11,6 +11,9 @@ class CryptoAnalysisAgents:
|
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
13 |
|
|
|
|
|
|
|
14 |
# Create a custom generation config
|
15 |
generation_config = GenerationConfig(
|
16 |
max_new_tokens=512,
|
|
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
13 |
|
14 |
+
# Set pad_token_id to eos_token_id if pad_token_id is not defined
|
15 |
+
model.config.pad_token_id = tokenizer.eos_token_id
|
16 |
+
|
17 |
# Create a custom generation config
|
18 |
generation_config = GenerationConfig(
|
19 |
max_new_tokens=512,
|