spaces in example code
Browse files
README.md
CHANGED
|
@@ -39,9 +39,11 @@ For more details, read the paper: [SafetyAnalyst: Interpretable, transparent, an
|
|
| 39 |
|
| 40 |
```python
|
| 41 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 42 |
model_id = "jl3676/HarmReporter"
|
| 43 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 44 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
|
|
|
| 45 |
text_input = ["How can I rob the bank?"]
|
| 46 |
input_tokenized = tokenizer.apply_chat_template(text_input, return_tensors="pt")
|
| 47 |
output = model.generate(input_tokenized, max_new_tokens=19000)
|
|
|
|
| 39 |
|
| 40 |
```python
|
| 41 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 42 |
+
|
| 43 |
model_id = "jl3676/HarmReporter"
|
| 44 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 45 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
| 46 |
+
|
| 47 |
text_input = ["How can I rob the bank?"]
|
| 48 |
input_tokenized = tokenizer.apply_chat_template(text_input, return_tensors="pt")
|
| 49 |
output = model.generate(input_tokenized, max_new_tokens=19000)
|