sarath2803 commited on
Commit
562b4d9
·
verified ·
1 Parent(s): 746d1ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -88,7 +88,7 @@ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_co
88
  class BasicAgent:
89
  def __init__(self):
90
  print("BasicAgent initialized.")
91
- token = os.environ["HF_TOKEN"] # Set your Hugging Face token in the environment
92
  self.system_prompt= """You are a helpful assistant. You will answer questions based on the provided context.You will always return a valid answer, even if the question is not clear or the context is insufficient. If you cannot answer, return a default answer.Always return a valid answer after validating the source.
93
  Always return the answer in the following format:
94
  "ANSWER: <your answer here>".
@@ -144,9 +144,9 @@ class BasicAgent:
144
  """
145
 
146
  model = InferenceClientModel(
147
- model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
148
- token=token, # Set your Hugging Face token in the environment
149
- provider="auto"
150
  )
151
  self.agent= CodeAgent(
152
  tools = [add, subtract, multiply, divide, web_search, image_generation_tool],
 
88
  class BasicAgent:
89
  def __init__(self):
90
  print("BasicAgent initialized.")
91
+ token=os.environ["OPENROUTER_API_KEY"]
92
  self.system_prompt= """You are a helpful assistant. You will answer questions based on the provided context.You will always return a valid answer, even if the question is not clear or the context is insufficient. If you cannot answer, return a default answer.Always return a valid answer after validating the source.
93
  Always return the answer in the following format:
94
  "ANSWER: <your answer here>".
 
144
  """
145
 
146
  model = InferenceClientModel(
147
+ model_id="openrouter/deepseek-coder",
148
+ token=token, # Set your Hugging Face token in the environment
149
+ provider="openrouter" # Use openrouter as the provider
150
  )
151
  self.agent= CodeAgent(
152
  tools = [add, subtract, multiply, divide, web_search, image_generation_tool],