betki commited on
Commit
0168b93
·
verified ·
1 Parent(s): af2de27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -10,7 +10,6 @@ load_dotenv() # Load environment variables from .env file
10
 
11
  import gradio as gr
12
  from smolagents import InferenceClientModel, CodeAgent, MCPClient
13
- from llama_index.llms.nebius import NebiusLLM
14
 
15
  try:
16
  mcp_client = MCPClient(
@@ -22,16 +21,7 @@ try:
22
 
23
  tools = mcp_client.get_tools()
24
 
25
- NEBIUS_API_KEY = os.getenv("NEBIUS_API_KEY")
26
- AGENT_MODEL = os.getenv("AGENT_MODEL", "meta-llama/Meta-Llama-3.1-8B-Instruct")
27
-
28
- # Load an LLM
29
- model = NebiusLLM(
30
- api_key=NEBIUS_API_KEY,
31
- model=AGENT_MODEL,
32
- is_function_calling_model=True
33
- )
34
-
35
  agent = CodeAgent(tools=[*tools], model=model)
36
 
37
  mcp_description = """
 
10
 
11
  import gradio as gr
12
  from smolagents import InferenceClientModel, CodeAgent, MCPClient
 
13
 
14
  try:
15
  mcp_client = MCPClient(
 
21
 
22
  tools = mcp_client.get_tools()
23
 
24
+ model = InferenceClientModel(token=os.getenv("HUGGINGFACE_API_TOKEN"))
 
 
 
 
 
 
 
 
 
25
  agent = CodeAgent(tools=[*tools], model=model)
26
 
27
  mcp_description = """