Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import requests
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import DuckDuckGoSearchTool
|
| 7 |
-
from tools import
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
| 10 |
# --- Constants ---
|
|
@@ -29,7 +29,11 @@ class NewAgent:
|
|
| 29 |
# Initialize the web search tool
|
| 30 |
search_tool = DuckDuckGoSearchTool()
|
| 31 |
# Initialize the Hub stats tool
|
| 32 |
-
hub_stats_tool =
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Generate the chat interface, including the tools
|
| 34 |
llm = HuggingFaceEndpoint(
|
| 35 |
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
|
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import DuckDuckGoSearchTool
|
| 7 |
+
from tools import get_hub_stats
|
| 8 |
|
| 9 |
# (Keep Constants as is)
|
| 10 |
# --- Constants ---
|
|
|
|
| 29 |
# Initialize the web search tool
|
| 30 |
search_tool = DuckDuckGoSearchTool()
|
| 31 |
# Initialize the Hub stats tool
|
| 32 |
+
hub_stats_tool = Tool(
|
| 33 |
+
name="get_hub_stats",
|
| 34 |
+
func=get_hub_stats,
|
| 35 |
+
description="Fetches the most downloaded model from a specific author on the Hugging Face Hub."
|
| 36 |
+
)
|
| 37 |
# Generate the chat interface, including the tools
|
| 38 |
llm = HuggingFaceEndpoint(
|
| 39 |
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|