Spaces:
Runtime error
Runtime error
add provider hf-inference
Browse files24 unmodified lines252627282829303127 unmodified lines596061626263646524 unmodified lines print("BasicAgent initialized.") model_id = os.getenv("HF_API_URL", "Qwen/Qwen2.5-7B-Instruct") token = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACEHUB_API_TOKEN") self.llm = InferenceClient(model=model_id, token=token) self.llm = InferenceClient(model=model_id, token=token, provider="hf-inference")
def _maybe_fetch_file(self, task_id: str): try:27 unmodified lines if context: prompt += f"\nContext:\n{context}\n" out = self.llm.text_generation(prompt, max_new_tokens=64, temperature=0) return _clean(out) return out.strip()
def __call__(self, question: str) -> str: a = self._try_math(question)app.py+2-2