Spaces:
Build error
Build error
Upload tool
Browse files- model_downloads.py +4 -4
- 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 |
-
|
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
|
9 |
)
|
10 |
|
11 |
inputs = {
|
12 |
-
"
|
13 |
"type": str,
|
14 |
-
"description": "the
|
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": "{'
|
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"
|