Hmd6919 commited on
Commit
353d382
·
verified ·
1 Parent(s): 975e7b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -2,16 +2,14 @@ import os
2
  import gradio as gr
3
  import requests
4
  import pandas as pd
5
- from smolagents import CodeAgent, DuckDuckGoSearchTool, LiteLLMModel
6
 
7
  def create_agent():
8
- # We use Qwen2.5-Coder as the brain 🧠
9
- model = LiteLLMModel(model_id="Qwen/Qwen2.5-Coder-32B-Instruct")
10
 
11
- # We give it the search tool so it can find answers on the web 🔍
12
  search_tool = DuckDuckGoSearchTool()
13
 
14
- # The CodeAgent can write Python to solve complex problems 🐍
15
  agent = CodeAgent(
16
  tools=[search_tool],
17
  model=model,
 
2
  import gradio as gr
3
  import requests
4
  import pandas as pd
5
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, HfEngine
6
 
7
  def create_agent():
8
+ # Use Hugging Face Inference API
9
+ model = HfEngine(model_id="Qwen/Qwen2.5-Coder-32B-Instruct")
10
 
 
11
  search_tool = DuckDuckGoSearchTool()
12
 
 
13
  agent = CodeAgent(
14
  tools=[search_tool],
15
  model=model,