fixed code
Browse files
README.md
CHANGED
@@ -48,8 +48,9 @@ input_text = "FIELD SPIN 0 SU2 2 U1 1 FIELD SPIN 1 / 2 SU3 3 SU2 2 U1 1 / 3 HEL
|
|
48 |
4) Perform generation:
|
49 |
|
50 |
```python
|
51 |
-
|
52 |
-
|
|
|
53 |
decoded_outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
54 |
print("Generated Lagrangian:")
|
55 |
print(decoded_outputs[0])
|
|
|
48 |
4) Perform generation:
|
49 |
|
50 |
```python
|
51 |
+
input_text = "FIELD SPIN 0 SU2 2 U1 1 FIELD SPIN 1 / 2 SU3 3 SU2 2 U1 1 / 3 HEL - 1 / 2"
|
52 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
53 |
+
outputs = model.generate(inputs['input_ids'], max_length=2048)
|
54 |
decoded_outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
|
55 |
print("Generated Lagrangian:")
|
56 |
print(decoded_outputs[0])
|