m-ric HF staff commited on
Commit
aee1d4b
1 Parent(s): 91cf03d

Upload tool

Browse files
Files changed (1) hide show
  1. tool.py +7 -7
tool.py CHANGED
@@ -1,12 +1,12 @@
1
  from agents import Tool
2
 
3
- class HFModelDownloadsTool(Tool):
4
- name = "model_download_counter"
5
- description = """
6
- This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub.
7
- It returns the name of the checkpoint."""
8
- inputs = {"task":{"type":"string","description":"the task category (such as text-classification, depth-estimation, etc)"}}
9
- output_type = "string"
10
 
11
  def forward(self, task: str):
12
  from huggingface_hub import list_models
 
1
  from agents import Tool
2
 
3
+ class HFModelDownloadsTool(Tool):
4
+ name = "model_download_counter"
5
+ description = """
6
+ This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub.
7
+ It returns the name of the checkpoint."""
8
+ inputs = {"task":{"type":"string","description":"the task category (such as text-classification, depth-estimation, etc)"}}
9
+ output_type = "string"
10
 
11
  def forward(self, task: str):
12
  from huggingface_hub import list_models