shubham7080 commited on
Commit
7dbd1bc
·
verified ·
1 Parent(s): f03d6ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -8,8 +8,19 @@ import pandas as pd
8
  import requests
9
 
10
  from agent import Agent
11
- from model import get_model
12
  from tools.tools import get_tools
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  # (Keep Constants as is)
15
  # --- Constants ---
@@ -50,7 +61,7 @@ def run_and_submit_all(
50
  # 1. Instantiate Agent ( modify this part to create your agent)
51
  try:
52
  agent = Agent(
53
- model=get_model("OpenAIServerModel", "gpt-4.1"), tools=get_tools()
54
  )
55
  except Exception as e:
56
  print(f"Error instantiating agent: {e}")
 
8
  import requests
9
 
10
  from agent import Agent
11
+ # from model import get_model
12
  from tools.tools import get_tools
13
+ import os
14
+ from smolagents import AzureOpenAIServerModel
15
+
16
+
17
+
18
+ model = AzureOpenAIServerModel(
19
+ model_id = os.environ.get("AZURE_OPENAI_MODEL"),
20
+ azure_endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
21
+ api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
22
+ api_version=os.environ.get("OPENAI_API_VERSION")
23
+ )
24
 
25
  # (Keep Constants as is)
26
  # --- Constants ---
 
61
  # 1. Instantiate Agent ( modify this part to create your agent)
62
  try:
63
  agent = Agent(
64
+ model=model, tools=get_tools()
65
  )
66
  except Exception as e:
67
  print(f"Error instantiating agent: {e}")