Spaces:
Sleeping
Sleeping
Update agent.py
Browse files8 unmodified lines91011121314121317141519161718192324202122272324258 unmodified linesIf you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string."""
from transformers import pipeline
SYSTEM_PROMPT = """...""" # oförändrat
class GaiaAgent: def __init__(self, model_id="tiiuae/falcon-rw-1b"): def __init__(self, model_id="google/flan-t5-base"): self.generator = pipeline( "text-generation", "text2text-generation", model=model_id, tokenizer=model_id, max_new_tokens=512, device="cpu", # viktigt! return_full_text=False device="cpu" )
def __call__(self, question: str) -> tuple[str, str]: try: prompt = f"{SYSTEM_PROMPT}\n\n{question}\nFINAL ANSWER:"agent.py+3-8