wishwakankanamg commited on
Commit
873bf60
·
verified ·
1 Parent(s): 4377dfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -35,11 +35,16 @@ class BasicAgent:
35
 
36
  # Initialize model and tools
37
 
38
- model = HfApiModel(
39
- model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
40
- token=openai_token,
41
- max_tokens=5000,
 
 
 
 
42
  provider="together",
 
43
  )
44
 
45
  # model = OpenAIServerModel(
@@ -61,7 +66,7 @@ class BasicAgent:
61
 
62
  # Build the agent
63
  self.agent = CodeAgent(
64
- model=model,
65
  prompt_templates=prompt_templates,
66
  tools=[search_tool, reverse_tool, table_tool, veg_tool, python_tool, exfood_tool], #final_answer_tool
67
  add_base_tools=True,
 
35
 
36
  # Initialize model and tools
37
 
38
+ # model = HfApiModel(
39
+ # model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
40
+ # token=openai_token,
41
+ # max_tokens=5000,
42
+ # provider="together",
43
+ # )
44
+
45
+ client = InferenceClient(
46
  provider="together",
47
+ api_key=openai_token,
48
  )
49
 
50
  # model = OpenAIServerModel(
 
66
 
67
  # Build the agent
68
  self.agent = CodeAgent(
69
+ model=client,
70
  prompt_templates=prompt_templates,
71
  tools=[search_tool, reverse_tool, table_tool, veg_tool, python_tool, exfood_tool], #final_answer_tool
72
  add_base_tools=True,