Spaces:
Sleeping
Sleeping
Update agent.py
Browse files8 unmodified lines910111213141516178 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."""class GaiaAgent:def __init__(self, model_id="tiiuae/falcon-rw-1b"):self.generator = pipeline("text-generation", model=model_id, tokenizer=model_id, max_new_tokens=512)def __call__(self, question: str) -> tuple[str, str]:try:8 unmodified lines910111213141516171819202122232425262728298 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 pipelineSYSTEM_PROMPT = """...""" # oförändratclass GaiaAgent:def __init__(self, model_id="tiiuae/falcon-rw-1b"):self.generator = pipeline("text-generation",model=model_id,tokenizer=model_id,max_new_tokens=512,device="cpu", # viktigt!return_full_text=False)def __call__(self, question: str) -> tuple[str, str]:try:
agent.py+13-1