hhhhmmmm commited on
Commit
2f1c417
·
verified ·
1 Parent(s): 9570ac3

change from HfApiModel to InferenceClientModel

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,13 +1,15 @@
1
  import gradio as gr
2
  import random
3
- from smolagents import GradioUI, CodeAgent, HfApiModel
 
4
 
5
  # Import our custom tools from their modules
6
  from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
7
  from retriever import load_guest_dataset
8
 
9
  # Initialize the Hugging Face model
10
- model = HfApiModel()
 
11
 
12
  # Initialize the web search tool
13
  search_tool = DuckDuckGoSearchTool()
 
1
  import gradio as gr
2
  import random
3
+ #from smolagents import GradioUI, CodeAgent, HfApiModel
4
+ from smolagents import GradioUI, CodeAgent, InferenceClientModel
5
 
6
  # Import our custom tools from their modules
7
  from tools import DuckDuckGoSearchTool, WeatherInfoTool, HubStatsTool
8
  from retriever import load_guest_dataset
9
 
10
  # Initialize the Hugging Face model
11
+ #model = HfApiModel()
12
+ model = InferenceClientModel()
13
 
14
  # Initialize the web search tool
15
  search_tool = DuckDuckGoSearchTool()