Spaces:
Runtime error
Runtime error
Upload tool
Browse files- model_downloads.py +2 -2
- requirements.txt +1 -1
- tool_config.json +1 -1
model_downloads.py
CHANGED
@@ -7,7 +7,7 @@ class HFModelDownloadsTool(Tool):
|
|
7 |
description = (
|
8 |
"This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub. "
|
9 |
"It takes the name of the category (such as text-classification, depth-estimation, etc), and "
|
10 |
-
"returns the name of the checkpoint
|
11 |
)
|
12 |
|
13 |
inputs = ['text']
|
@@ -15,4 +15,4 @@ class HFModelDownloadsTool(Tool):
|
|
15 |
|
16 |
def __call__(self, task: str):
|
17 |
model = next(iter(list_models(filter=task, sort='downloads', direction=-1)))
|
18 |
-
return
|
|
|
7 |
description = (
|
8 |
"This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub. "
|
9 |
"It takes the name of the category (such as text-classification, depth-estimation, etc), and "
|
10 |
+
"returns the name of the checkpoint"
|
11 |
)
|
12 |
|
13 |
inputs = ['text']
|
|
|
15 |
|
16 |
def __call__(self, task: str):
|
17 |
model = next(iter(list_models(filter=task, sort='downloads', direction=-1)))
|
18 |
+
return model.id
|
requirements.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
git+https://github.com/huggingface/transformers@test_composition
|
2 |
huggingface_hub
|
|
|
|
|
|
1 |
huggingface_hub
|
2 |
+
transformers
|
tool_config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"description": "This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub. It takes the name of the category (such as text-classification, depth-estimation, etc), and returns the name of the checkpoint
|
3 |
"name": "model_download_counter",
|
4 |
"tool_class": "model_downloads.HFModelDownloadsTool"
|
5 |
}
|
|
|
1 |
{
|
2 |
+
"description": "This is a tool that returns the most downloaded model of a given task on the Hugging Face Hub. It takes the name of the category (such as text-classification, depth-estimation, etc), and returns the name of the checkpoint",
|
3 |
"name": "model_download_counter",
|
4 |
"tool_class": "model_downloads.HFModelDownloadsTool"
|
5 |
}
|