m-ric HF staff commited on
Commit
447851c
1 Parent(s): 9192a08

Upload tool

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