Spaces:
Runtime error
Runtime error
Update agents/software_architect_agent.py
Browse files
agents/software_architect_agent.py
CHANGED
|
@@ -13,7 +13,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 13 |
def run(state):
|
| 14 |
"""Designs system architecture from project plan."""
|
| 15 |
prompt = state["input"]
|
| 16 |
-
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
| 17 |
output_ids = model.generate(input_ids, max_new_tokens=512)
|
| 18 |
output = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
| 19 |
|
|
|
|
| 13 |
def run(state):
|
| 14 |
"""Designs system architecture from project plan."""
|
| 15 |
prompt = state["input"]
|
| 16 |
+
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(model.device)
|
| 17 |
output_ids = model.generate(input_ids, max_new_tokens=512)
|
| 18 |
output = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
| 19 |
|