Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files90 unmodified lines91929394959697989959 unmodified lines15916016116216316416590 unmodified linesreturn f"Error downloading file for task '{task_id}': {str(e)}"litellm.drop_params = Trueopenrouter_key = (os.getenv("OPENROUTER_API_KEY") or "").strip(" '\"\n\r\t") or Noneif openrouter_key:os.environ["OPENROUTER_API_KEY"] = openrouter_keymodel = LiteLLMModel(model_id="openrouter/nvidia/nemotron-3.5-lightning:free",59 unmodified linestry:result = self.agent.run(prompt)raw_text = "" if result is None else str(result).strip()return _clean_exact_match_answer(raw_text)except Exception as exc:return f"AGENT ERROR: {exc}"90 unmodified lines91929394959697989910010110210310410559 unmodified lines16516616716816917017190 unmodified linesreturn f"Error downloading file for task '{task_id}': {str(e)}"litellm.drop_params = Trueraw_key = os.getenv("OPENROUTER_API_KEY")openrouter_key = (os.getenv("OPENROUTER_API_KEY") or "").strip(" '\"\n\r\t") or Noneif not openrouter_key:raise ValueError("Missing OPENROUTER_API_KEY in environment/secrets. ""Add OPENROUTER_API_KEY in Space Settings -> Variables and secrets and restart the Space.")os.environ["OPENROUTER_API_KEY"] = openrouter_keymodel = LiteLLMModel(model_id="openrouter/nvidia/nemotron-3.5-lightning:free",59 unmodified linestry:result = self.agent.run(prompt)raw_text = "" if result is None else str(result).strip()return self._clean_exact_match_answer(raw_text)except Exception as exc:return f"AGENT ERROR: {exc}"
app.py+9-3