huggingface-hub 0.31.0rc0__py3-none-any.whl → 1.1.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- huggingface_hub/__init__.py +145 -46
- huggingface_hub/_commit_api.py +168 -119
- huggingface_hub/_commit_scheduler.py +15 -15
- huggingface_hub/_inference_endpoints.py +15 -12
- huggingface_hub/_jobs_api.py +301 -0
- huggingface_hub/_local_folder.py +18 -3
- huggingface_hub/_login.py +31 -63
- huggingface_hub/_oauth.py +460 -0
- huggingface_hub/_snapshot_download.py +239 -80
- huggingface_hub/_space_api.py +5 -5
- huggingface_hub/_tensorboard_logger.py +15 -19
- huggingface_hub/_upload_large_folder.py +172 -76
- huggingface_hub/_webhooks_payload.py +3 -3
- huggingface_hub/_webhooks_server.py +13 -25
- huggingface_hub/{commands → cli}/__init__.py +1 -15
- huggingface_hub/cli/_cli_utils.py +173 -0
- huggingface_hub/cli/auth.py +147 -0
- huggingface_hub/cli/cache.py +841 -0
- huggingface_hub/cli/download.py +189 -0
- huggingface_hub/cli/hf.py +60 -0
- huggingface_hub/cli/inference_endpoints.py +377 -0
- huggingface_hub/cli/jobs.py +772 -0
- huggingface_hub/cli/lfs.py +175 -0
- huggingface_hub/cli/repo.py +315 -0
- huggingface_hub/cli/repo_files.py +94 -0
- huggingface_hub/{commands/env.py → cli/system.py} +10 -13
- huggingface_hub/cli/upload.py +294 -0
- huggingface_hub/cli/upload_large_folder.py +117 -0
- huggingface_hub/community.py +20 -12
- huggingface_hub/constants.py +38 -53
- huggingface_hub/dataclasses.py +609 -0
- huggingface_hub/errors.py +80 -30
- huggingface_hub/fastai_utils.py +30 -41
- huggingface_hub/file_download.py +435 -351
- huggingface_hub/hf_api.py +2050 -1124
- huggingface_hub/hf_file_system.py +269 -152
- huggingface_hub/hub_mixin.py +43 -63
- huggingface_hub/inference/_client.py +347 -434
- huggingface_hub/inference/_common.py +133 -121
- huggingface_hub/inference/_generated/_async_client.py +397 -541
- huggingface_hub/inference/_generated/types/__init__.py +5 -1
- huggingface_hub/inference/_generated/types/automatic_speech_recognition.py +3 -3
- huggingface_hub/inference/_generated/types/base.py +10 -7
- huggingface_hub/inference/_generated/types/chat_completion.py +59 -23
- huggingface_hub/inference/_generated/types/depth_estimation.py +2 -2
- huggingface_hub/inference/_generated/types/document_question_answering.py +2 -2
- huggingface_hub/inference/_generated/types/feature_extraction.py +2 -2
- huggingface_hub/inference/_generated/types/fill_mask.py +2 -2
- huggingface_hub/inference/_generated/types/image_to_image.py +6 -2
- huggingface_hub/inference/_generated/types/image_to_video.py +60 -0
- huggingface_hub/inference/_generated/types/sentence_similarity.py +3 -3
- huggingface_hub/inference/_generated/types/summarization.py +2 -2
- huggingface_hub/inference/_generated/types/table_question_answering.py +5 -5
- huggingface_hub/inference/_generated/types/text2text_generation.py +2 -2
- huggingface_hub/inference/_generated/types/text_generation.py +10 -10
- huggingface_hub/inference/_generated/types/text_to_video.py +2 -2
- huggingface_hub/inference/_generated/types/token_classification.py +2 -2
- huggingface_hub/inference/_generated/types/translation.py +2 -2
- huggingface_hub/inference/_generated/types/zero_shot_classification.py +2 -2
- huggingface_hub/inference/_generated/types/zero_shot_image_classification.py +2 -2
- huggingface_hub/inference/_generated/types/zero_shot_object_detection.py +1 -3
- huggingface_hub/inference/_mcp/__init__.py +0 -0
- huggingface_hub/inference/_mcp/_cli_hacks.py +88 -0
- huggingface_hub/inference/_mcp/agent.py +100 -0
- huggingface_hub/inference/_mcp/cli.py +247 -0
- huggingface_hub/inference/_mcp/constants.py +81 -0
- huggingface_hub/inference/_mcp/mcp_client.py +395 -0
- huggingface_hub/inference/_mcp/types.py +45 -0
- huggingface_hub/inference/_mcp/utils.py +128 -0
- huggingface_hub/inference/_providers/__init__.py +82 -7
- huggingface_hub/inference/_providers/_common.py +129 -27
- huggingface_hub/inference/_providers/black_forest_labs.py +6 -6
- huggingface_hub/inference/_providers/cerebras.py +1 -1
- huggingface_hub/inference/_providers/clarifai.py +13 -0
- huggingface_hub/inference/_providers/cohere.py +20 -3
- huggingface_hub/inference/_providers/fal_ai.py +183 -56
- huggingface_hub/inference/_providers/featherless_ai.py +38 -0
- huggingface_hub/inference/_providers/fireworks_ai.py +18 -0
- huggingface_hub/inference/_providers/groq.py +9 -0
- huggingface_hub/inference/_providers/hf_inference.py +69 -30
- huggingface_hub/inference/_providers/hyperbolic.py +4 -4
- huggingface_hub/inference/_providers/nebius.py +33 -5
- huggingface_hub/inference/_providers/novita.py +5 -5
- huggingface_hub/inference/_providers/nscale.py +44 -0
- huggingface_hub/inference/_providers/openai.py +3 -1
- huggingface_hub/inference/_providers/publicai.py +6 -0
- huggingface_hub/inference/_providers/replicate.py +31 -13
- huggingface_hub/inference/_providers/sambanova.py +18 -4
- huggingface_hub/inference/_providers/scaleway.py +28 -0
- huggingface_hub/inference/_providers/together.py +20 -5
- huggingface_hub/inference/_providers/wavespeed.py +138 -0
- huggingface_hub/inference/_providers/zai_org.py +17 -0
- huggingface_hub/lfs.py +33 -100
- huggingface_hub/repocard.py +34 -38
- huggingface_hub/repocard_data.py +57 -57
- huggingface_hub/serialization/__init__.py +0 -1
- huggingface_hub/serialization/_base.py +12 -15
- huggingface_hub/serialization/_dduf.py +8 -8
- huggingface_hub/serialization/_torch.py +69 -69
- huggingface_hub/utils/__init__.py +19 -8
- huggingface_hub/utils/_auth.py +7 -7
- huggingface_hub/utils/_cache_manager.py +92 -147
- huggingface_hub/utils/_chunk_utils.py +2 -3
- huggingface_hub/utils/_deprecation.py +1 -1
- huggingface_hub/utils/_dotenv.py +55 -0
- huggingface_hub/utils/_experimental.py +7 -5
- huggingface_hub/utils/_fixes.py +0 -10
- huggingface_hub/utils/_git_credential.py +5 -5
- huggingface_hub/utils/_headers.py +8 -30
- huggingface_hub/utils/_http.py +398 -239
- huggingface_hub/utils/_pagination.py +4 -4
- huggingface_hub/utils/_parsing.py +98 -0
- huggingface_hub/utils/_paths.py +5 -5
- huggingface_hub/utils/_runtime.py +61 -24
- huggingface_hub/utils/_safetensors.py +21 -21
- huggingface_hub/utils/_subprocess.py +9 -9
- huggingface_hub/utils/_telemetry.py +4 -4
- huggingface_hub/{commands/_cli_utils.py → utils/_terminal.py} +4 -4
- huggingface_hub/utils/_typing.py +25 -5
- huggingface_hub/utils/_validators.py +55 -74
- huggingface_hub/utils/_verification.py +167 -0
- huggingface_hub/utils/_xet.py +64 -17
- huggingface_hub/utils/_xet_progress_reporting.py +162 -0
- huggingface_hub/utils/insecure_hashlib.py +3 -5
- huggingface_hub/utils/logging.py +8 -11
- huggingface_hub/utils/tqdm.py +5 -4
- {huggingface_hub-0.31.0rc0.dist-info → huggingface_hub-1.1.3.dist-info}/METADATA +94 -85
- huggingface_hub-1.1.3.dist-info/RECORD +155 -0
- {huggingface_hub-0.31.0rc0.dist-info → huggingface_hub-1.1.3.dist-info}/WHEEL +1 -1
- huggingface_hub-1.1.3.dist-info/entry_points.txt +6 -0
- huggingface_hub/commands/delete_cache.py +0 -474
- huggingface_hub/commands/download.py +0 -200
- huggingface_hub/commands/huggingface_cli.py +0 -61
- huggingface_hub/commands/lfs.py +0 -200
- huggingface_hub/commands/repo_files.py +0 -128
- huggingface_hub/commands/scan_cache.py +0 -181
- huggingface_hub/commands/tag.py +0 -159
- huggingface_hub/commands/upload.py +0 -314
- huggingface_hub/commands/upload_large_folder.py +0 -129
- huggingface_hub/commands/user.py +0 -304
- huggingface_hub/commands/version.py +0 -37
- huggingface_hub/inference_api.py +0 -217
- huggingface_hub/keras_mixin.py +0 -500
- huggingface_hub/repository.py +0 -1477
- huggingface_hub/serialization/_tensorflow.py +0 -95
- huggingface_hub/utils/_hf_folder.py +0 -68
- huggingface_hub-0.31.0rc0.dist-info/RECORD +0 -135
- huggingface_hub-0.31.0rc0.dist-info/entry_points.txt +0 -6
- {huggingface_hub-0.31.0rc0.dist-info → huggingface_hub-1.1.3.dist-info/licenses}/LICENSE +0 -0
- {huggingface_hub-0.31.0rc0.dist-info → huggingface_hub-1.1.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
from collections import OrderedDict
|
|
2
|
+
from typing import List
|
|
3
|
+
|
|
4
|
+
from hf_xet import PyItemProgressUpdate, PyTotalProgressUpdate
|
|
5
|
+
|
|
6
|
+
from . import is_google_colab, is_notebook
|
|
7
|
+
from .tqdm import tqdm
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class XetProgressReporter:
|
|
11
|
+
"""
|
|
12
|
+
Reports on progress for Xet uploads.
|
|
13
|
+
|
|
14
|
+
Shows summary progress bars when running in notebooks or GUIs, and detailed per-file progress in console environments.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
def __init__(self, n_lines: int = 10, description_width: int = 30):
|
|
18
|
+
self.n_lines = n_lines
|
|
19
|
+
self.description_width = description_width
|
|
20
|
+
|
|
21
|
+
self.per_file_progress = is_google_colab() or not is_notebook()
|
|
22
|
+
|
|
23
|
+
self.tqdm_settings = {
|
|
24
|
+
"unit": "B",
|
|
25
|
+
"unit_scale": True,
|
|
26
|
+
"leave": True,
|
|
27
|
+
"unit_divisor": 1000,
|
|
28
|
+
"nrows": n_lines + 3 if self.per_file_progress else 3,
|
|
29
|
+
"miniters": 1,
|
|
30
|
+
"bar_format": "{l_bar}{bar}| {n_fmt:>5}B / {total_fmt:>5}B{postfix:>12}",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Overall progress bars
|
|
34
|
+
self.data_processing_bar = tqdm(
|
|
35
|
+
total=0, desc=self.format_desc("Processing Files (0 / 0)", False), position=0, **self.tqdm_settings
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
self.upload_bar = tqdm(
|
|
39
|
+
total=0, desc=self.format_desc("New Data Upload", False), position=1, **self.tqdm_settings
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
self.known_items: set[str] = set()
|
|
43
|
+
self.completed_items: set[str] = set()
|
|
44
|
+
|
|
45
|
+
# Item bars (scrolling view)
|
|
46
|
+
self.item_state: OrderedDict[str, PyItemProgressUpdate] = OrderedDict()
|
|
47
|
+
self.current_bars: List = [None] * self.n_lines
|
|
48
|
+
|
|
49
|
+
def format_desc(self, name: str, indent: bool) -> str:
|
|
50
|
+
"""
|
|
51
|
+
if name is longer than width characters, prints ... at the start and then the last width-3 characters of the name, otherwise
|
|
52
|
+
the whole name right justified into description_width characters. Also adds some padding.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
if not self.per_file_progress:
|
|
56
|
+
# Here we just use the defaults.
|
|
57
|
+
return name
|
|
58
|
+
|
|
59
|
+
padding = " " if indent else ""
|
|
60
|
+
width = self.description_width - len(padding)
|
|
61
|
+
|
|
62
|
+
if len(name) > width:
|
|
63
|
+
name = f"...{name[-(width - 3) :]}"
|
|
64
|
+
|
|
65
|
+
return f"{padding}{name.ljust(width)}"
|
|
66
|
+
|
|
67
|
+
def update_progress(self, total_update: PyTotalProgressUpdate, item_updates: list[PyItemProgressUpdate]):
|
|
68
|
+
# Update all the per-item values.
|
|
69
|
+
for item in item_updates:
|
|
70
|
+
item_name = item.item_name
|
|
71
|
+
|
|
72
|
+
self.known_items.add(item_name)
|
|
73
|
+
|
|
74
|
+
# Only care about items where the processing has already started.
|
|
75
|
+
if item.bytes_completed == 0:
|
|
76
|
+
continue
|
|
77
|
+
|
|
78
|
+
# Overwrite the existing value in there.
|
|
79
|
+
self.item_state[item_name] = item
|
|
80
|
+
|
|
81
|
+
bar_idx = 0
|
|
82
|
+
new_completed = []
|
|
83
|
+
|
|
84
|
+
# Now, go through and update all the bars
|
|
85
|
+
for name, item in self.item_state.items():
|
|
86
|
+
# Is this ready to be removed on the next update?
|
|
87
|
+
if item.bytes_completed == item.total_bytes:
|
|
88
|
+
self.completed_items.add(name)
|
|
89
|
+
new_completed.append(name)
|
|
90
|
+
|
|
91
|
+
# If we're only showing summary information, then don't update the individual bars
|
|
92
|
+
if not self.per_file_progress:
|
|
93
|
+
continue
|
|
94
|
+
|
|
95
|
+
# If we've run out of bars to use, then collapse the last ones together.
|
|
96
|
+
if bar_idx >= len(self.current_bars):
|
|
97
|
+
bar = self.current_bars[-1]
|
|
98
|
+
in_final_bar_mode = True
|
|
99
|
+
final_bar_aggregation_count = bar_idx + 1 - len(self.current_bars)
|
|
100
|
+
else:
|
|
101
|
+
bar = self.current_bars[bar_idx]
|
|
102
|
+
in_final_bar_mode = False
|
|
103
|
+
|
|
104
|
+
if bar is None:
|
|
105
|
+
self.current_bars[bar_idx] = tqdm(
|
|
106
|
+
desc=self.format_desc(name, True),
|
|
107
|
+
position=2 + bar_idx, # Set to the position past the initial bars.
|
|
108
|
+
total=item.total_bytes,
|
|
109
|
+
initial=item.bytes_completed,
|
|
110
|
+
**self.tqdm_settings,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
elif in_final_bar_mode:
|
|
114
|
+
bar.n += item.bytes_completed
|
|
115
|
+
bar.total += item.total_bytes
|
|
116
|
+
bar.set_description(self.format_desc(f"[+ {final_bar_aggregation_count} files]", True), refresh=False)
|
|
117
|
+
else:
|
|
118
|
+
bar.set_description(self.format_desc(name, True), refresh=False)
|
|
119
|
+
bar.n = item.bytes_completed
|
|
120
|
+
bar.total = item.total_bytes
|
|
121
|
+
|
|
122
|
+
bar_idx += 1
|
|
123
|
+
|
|
124
|
+
# Remove all the completed ones from the ordered dictionary
|
|
125
|
+
for name in new_completed:
|
|
126
|
+
# Only remove ones from consideration to make room for more items coming in.
|
|
127
|
+
if len(self.item_state) <= self.n_lines:
|
|
128
|
+
break
|
|
129
|
+
|
|
130
|
+
del self.item_state[name]
|
|
131
|
+
|
|
132
|
+
if self.per_file_progress:
|
|
133
|
+
# Now manually refresh each of the bars
|
|
134
|
+
for bar in self.current_bars:
|
|
135
|
+
if bar:
|
|
136
|
+
bar.refresh()
|
|
137
|
+
|
|
138
|
+
# Update overall bars
|
|
139
|
+
def postfix(speed):
|
|
140
|
+
s = tqdm.format_sizeof(speed) if speed is not None else "???"
|
|
141
|
+
return f"{s}B/s ".rjust(10, " ")
|
|
142
|
+
|
|
143
|
+
self.data_processing_bar.total = total_update.total_bytes
|
|
144
|
+
self.data_processing_bar.set_description(
|
|
145
|
+
self.format_desc(f"Processing Files ({len(self.completed_items)} / {len(self.known_items)})", False),
|
|
146
|
+
refresh=False,
|
|
147
|
+
)
|
|
148
|
+
self.data_processing_bar.set_postfix_str(postfix(total_update.total_bytes_completion_rate), refresh=False)
|
|
149
|
+
self.data_processing_bar.update(total_update.total_bytes_completion_increment)
|
|
150
|
+
|
|
151
|
+
self.upload_bar.total = total_update.total_transfer_bytes
|
|
152
|
+
self.upload_bar.set_postfix_str(postfix(total_update.total_transfer_bytes_completion_rate), refresh=False)
|
|
153
|
+
self.upload_bar.update(total_update.total_transfer_bytes_completion_increment)
|
|
154
|
+
|
|
155
|
+
def close(self, _success):
|
|
156
|
+
self.data_processing_bar.close()
|
|
157
|
+
self.upload_bar.close()
|
|
158
|
+
|
|
159
|
+
if self.per_file_progress:
|
|
160
|
+
for bar in self.current_bars:
|
|
161
|
+
if bar:
|
|
162
|
+
bar.close()
|
|
@@ -25,10 +25,8 @@
|
|
|
25
25
|
# ```
|
|
26
26
|
import functools
|
|
27
27
|
import hashlib
|
|
28
|
-
import sys
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
sha256 = functools.partial(hashlib.sha256, **_kwargs)
|
|
30
|
+
md5 = functools.partial(hashlib.md5, usedforsecurity=False)
|
|
31
|
+
sha1 = functools.partial(hashlib.sha1, usedforsecurity=False)
|
|
32
|
+
sha256 = functools.partial(hashlib.sha256, usedforsecurity=False)
|
huggingface_hub/utils/logging.py
CHANGED
|
@@ -109,17 +109,14 @@ def get_verbosity() -> int:
|
|
|
109
109
|
Logging level, e.g., `huggingface_hub.logging.DEBUG` and
|
|
110
110
|
`huggingface_hub.logging.INFO`.
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- `huggingface_hub.logging.
|
|
117
|
-
- `huggingface_hub.logging.
|
|
118
|
-
- `huggingface_hub.logging.
|
|
119
|
-
- `huggingface_hub.logging.
|
|
120
|
-
- `huggingface_hub.logging.DEBUG`
|
|
121
|
-
|
|
122
|
-
</Tip>
|
|
112
|
+
> [!TIP]
|
|
113
|
+
> HuggingFace Hub has following logging levels:
|
|
114
|
+
>
|
|
115
|
+
> - `huggingface_hub.logging.CRITICAL`, `huggingface_hub.logging.FATAL`
|
|
116
|
+
> - `huggingface_hub.logging.ERROR`
|
|
117
|
+
> - `huggingface_hub.logging.WARNING`, `huggingface_hub.logging.WARN`
|
|
118
|
+
> - `huggingface_hub.logging.INFO`
|
|
119
|
+
> - `huggingface_hub.logging.DEBUG`
|
|
123
120
|
"""
|
|
124
121
|
return _get_library_root_logger().getEffectiveLevel()
|
|
125
122
|
|
huggingface_hub/utils/tqdm.py
CHANGED
|
@@ -86,7 +86,7 @@ import os
|
|
|
86
86
|
import warnings
|
|
87
87
|
from contextlib import contextmanager, nullcontext
|
|
88
88
|
from pathlib import Path
|
|
89
|
-
from typing import ContextManager,
|
|
89
|
+
from typing import ContextManager, Iterator, Optional, Union
|
|
90
90
|
|
|
91
91
|
from tqdm.auto import tqdm as old_tqdm
|
|
92
92
|
|
|
@@ -102,7 +102,7 @@ from ..constants import HF_HUB_DISABLE_PROGRESS_BARS
|
|
|
102
102
|
# progress bar visibility through code. By default, progress bars are turned on.
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
progress_bar_states:
|
|
105
|
+
progress_bar_states: dict[str, bool] = {}
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
def disable_progress_bars(name: Optional[str] = None) -> None:
|
|
@@ -248,7 +248,7 @@ def tqdm_stream_file(path: Union[Path, str]) -> Iterator[io.BufferedReader]:
|
|
|
248
248
|
Example:
|
|
249
249
|
```py
|
|
250
250
|
>>> with tqdm_stream_file("config.json") as f:
|
|
251
|
-
>>>
|
|
251
|
+
>>> httpx.put(url, data=f)
|
|
252
252
|
config.json: 100%|█████████████████████████| 8.19k/8.19k [00:02<00:00, 3.72kB/s]
|
|
253
253
|
```
|
|
254
254
|
"""
|
|
@@ -288,6 +288,7 @@ def _get_progress_bar_context(
|
|
|
288
288
|
unit: str = "B",
|
|
289
289
|
unit_scale: bool = True,
|
|
290
290
|
name: Optional[str] = None,
|
|
291
|
+
tqdm_class: Optional[type[old_tqdm]] = None,
|
|
291
292
|
_tqdm_bar: Optional[tqdm] = None,
|
|
292
293
|
) -> ContextManager[tqdm]:
|
|
293
294
|
if _tqdm_bar is not None:
|
|
@@ -296,7 +297,7 @@ def _get_progress_bar_context(
|
|
|
296
297
|
# Makes it easier to use the same code path for both cases but in the later
|
|
297
298
|
# case, the progress bar is not closed when exiting the context manager.
|
|
298
299
|
|
|
299
|
-
return tqdm(
|
|
300
|
+
return (tqdm_class or tqdm)( # type: ignore[return-value]
|
|
300
301
|
unit=unit,
|
|
301
302
|
unit_scale=unit_scale,
|
|
302
303
|
total=total,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version:
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: huggingface_hub
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
|
|
5
5
|
Home-page: https://github.com/huggingface/huggingface_hub
|
|
6
6
|
Author: Hugging Face, Inc.
|
|
7
7
|
Author-email: julien@huggingface.co
|
|
8
8
|
License: Apache
|
|
9
9
|
Keywords: model-hub machine-learning models natural-language-processing deep-learning pytorch pretrained-models
|
|
10
|
-
Platform: UNKNOWN
|
|
11
10
|
Classifier: Intended Audience :: Developers
|
|
12
11
|
Classifier: Intended Audience :: Education
|
|
13
12
|
Classifier: Intended Audience :: Science/Research
|
|
@@ -15,135 +14,147 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
15
14
|
Classifier: Operating System :: OS Independent
|
|
16
15
|
Classifier: Programming Language :: Python :: 3
|
|
17
16
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
23
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.9.0
|
|
26
25
|
Description-Content-Type: text/markdown
|
|
27
26
|
License-File: LICENSE
|
|
28
27
|
Requires-Dist: filelock
|
|
29
28
|
Requires-Dist: fsspec>=2023.5.0
|
|
29
|
+
Requires-Dist: hf-xet<2.0.0,>=1.2.0; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "arm64" or platform_machine == "aarch64"
|
|
30
|
+
Requires-Dist: httpx<1,>=0.23.0
|
|
30
31
|
Requires-Dist: packaging>=20.9
|
|
31
32
|
Requires-Dist: pyyaml>=5.1
|
|
32
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: shellingham
|
|
33
34
|
Requires-Dist: tqdm>=4.42.1
|
|
35
|
+
Requires-Dist: typer-slim
|
|
34
36
|
Requires-Dist: typing-extensions>=3.7.4.3
|
|
35
|
-
|
|
37
|
+
Provides-Extra: oauth
|
|
38
|
+
Requires-Dist: authlib>=1.3.2; extra == "oauth"
|
|
39
|
+
Requires-Dist: fastapi; extra == "oauth"
|
|
40
|
+
Requires-Dist: httpx; extra == "oauth"
|
|
41
|
+
Requires-Dist: itsdangerous; extra == "oauth"
|
|
42
|
+
Provides-Extra: torch
|
|
43
|
+
Requires-Dist: torch; extra == "torch"
|
|
44
|
+
Requires-Dist: safetensors[torch]; extra == "torch"
|
|
45
|
+
Provides-Extra: fastai
|
|
46
|
+
Requires-Dist: toml; extra == "fastai"
|
|
47
|
+
Requires-Dist: fastai>=2.4; extra == "fastai"
|
|
48
|
+
Requires-Dist: fastcore>=1.3.27; extra == "fastai"
|
|
49
|
+
Provides-Extra: hf-xet
|
|
50
|
+
Requires-Dist: hf-xet<2.0.0,>=1.1.3; extra == "hf-xet"
|
|
51
|
+
Provides-Extra: mcp
|
|
52
|
+
Requires-Dist: mcp>=1.8.0; extra == "mcp"
|
|
53
|
+
Provides-Extra: testing
|
|
54
|
+
Requires-Dist: authlib>=1.3.2; extra == "testing"
|
|
55
|
+
Requires-Dist: fastapi; extra == "testing"
|
|
56
|
+
Requires-Dist: httpx; extra == "testing"
|
|
57
|
+
Requires-Dist: itsdangerous; extra == "testing"
|
|
58
|
+
Requires-Dist: jedi; extra == "testing"
|
|
59
|
+
Requires-Dist: Jinja2; extra == "testing"
|
|
60
|
+
Requires-Dist: pytest>=8.4.2; extra == "testing"
|
|
61
|
+
Requires-Dist: pytest-cov; extra == "testing"
|
|
62
|
+
Requires-Dist: pytest-env; extra == "testing"
|
|
63
|
+
Requires-Dist: pytest-xdist; extra == "testing"
|
|
64
|
+
Requires-Dist: pytest-vcr; extra == "testing"
|
|
65
|
+
Requires-Dist: pytest-asyncio; extra == "testing"
|
|
66
|
+
Requires-Dist: pytest-rerunfailures<16.0; extra == "testing"
|
|
67
|
+
Requires-Dist: pytest-mock; extra == "testing"
|
|
68
|
+
Requires-Dist: urllib3<2.0; extra == "testing"
|
|
69
|
+
Requires-Dist: soundfile; extra == "testing"
|
|
70
|
+
Requires-Dist: Pillow; extra == "testing"
|
|
71
|
+
Requires-Dist: numpy; extra == "testing"
|
|
72
|
+
Requires-Dist: fastapi; extra == "testing"
|
|
73
|
+
Provides-Extra: typing
|
|
74
|
+
Requires-Dist: typing-extensions>=4.8.0; extra == "typing"
|
|
75
|
+
Requires-Dist: types-PyYAML; extra == "typing"
|
|
76
|
+
Requires-Dist: types-simplejson; extra == "typing"
|
|
77
|
+
Requires-Dist: types-toml; extra == "typing"
|
|
78
|
+
Requires-Dist: types-tqdm; extra == "typing"
|
|
79
|
+
Requires-Dist: types-urllib3; extra == "typing"
|
|
80
|
+
Provides-Extra: quality
|
|
81
|
+
Requires-Dist: ruff>=0.9.0; extra == "quality"
|
|
82
|
+
Requires-Dist: mypy==1.15.0; extra == "quality"
|
|
83
|
+
Requires-Dist: libcst>=1.4.0; extra == "quality"
|
|
84
|
+
Requires-Dist: ty; extra == "quality"
|
|
36
85
|
Provides-Extra: all
|
|
37
|
-
Requires-Dist:
|
|
38
|
-
Requires-Dist:
|
|
86
|
+
Requires-Dist: authlib>=1.3.2; extra == "all"
|
|
87
|
+
Requires-Dist: fastapi; extra == "all"
|
|
88
|
+
Requires-Dist: httpx; extra == "all"
|
|
89
|
+
Requires-Dist: itsdangerous; extra == "all"
|
|
39
90
|
Requires-Dist: jedi; extra == "all"
|
|
40
91
|
Requires-Dist: Jinja2; extra == "all"
|
|
41
|
-
Requires-Dist: pytest
|
|
92
|
+
Requires-Dist: pytest>=8.4.2; extra == "all"
|
|
42
93
|
Requires-Dist: pytest-cov; extra == "all"
|
|
43
94
|
Requires-Dist: pytest-env; extra == "all"
|
|
44
95
|
Requires-Dist: pytest-xdist; extra == "all"
|
|
45
96
|
Requires-Dist: pytest-vcr; extra == "all"
|
|
46
97
|
Requires-Dist: pytest-asyncio; extra == "all"
|
|
47
|
-
Requires-Dist: pytest-rerunfailures; extra == "all"
|
|
98
|
+
Requires-Dist: pytest-rerunfailures<16.0; extra == "all"
|
|
48
99
|
Requires-Dist: pytest-mock; extra == "all"
|
|
49
100
|
Requires-Dist: urllib3<2.0; extra == "all"
|
|
50
101
|
Requires-Dist: soundfile; extra == "all"
|
|
51
102
|
Requires-Dist: Pillow; extra == "all"
|
|
52
|
-
Requires-Dist: gradio>=4.0.0; extra == "all"
|
|
53
103
|
Requires-Dist: numpy; extra == "all"
|
|
54
104
|
Requires-Dist: fastapi; extra == "all"
|
|
55
105
|
Requires-Dist: ruff>=0.9.0; extra == "all"
|
|
56
|
-
Requires-Dist: mypy==1.
|
|
57
|
-
Requires-Dist: libcst
|
|
106
|
+
Requires-Dist: mypy==1.15.0; extra == "all"
|
|
107
|
+
Requires-Dist: libcst>=1.4.0; extra == "all"
|
|
108
|
+
Requires-Dist: ty; extra == "all"
|
|
58
109
|
Requires-Dist: typing-extensions>=4.8.0; extra == "all"
|
|
59
110
|
Requires-Dist: types-PyYAML; extra == "all"
|
|
60
|
-
Requires-Dist: types-requests; extra == "all"
|
|
61
111
|
Requires-Dist: types-simplejson; extra == "all"
|
|
62
112
|
Requires-Dist: types-toml; extra == "all"
|
|
63
113
|
Requires-Dist: types-tqdm; extra == "all"
|
|
64
114
|
Requires-Dist: types-urllib3; extra == "all"
|
|
65
|
-
Provides-Extra: cli
|
|
66
|
-
Requires-Dist: InquirerPy==0.3.4; extra == "cli"
|
|
67
115
|
Provides-Extra: dev
|
|
68
|
-
Requires-Dist:
|
|
69
|
-
Requires-Dist:
|
|
116
|
+
Requires-Dist: authlib>=1.3.2; extra == "dev"
|
|
117
|
+
Requires-Dist: fastapi; extra == "dev"
|
|
118
|
+
Requires-Dist: httpx; extra == "dev"
|
|
119
|
+
Requires-Dist: itsdangerous; extra == "dev"
|
|
70
120
|
Requires-Dist: jedi; extra == "dev"
|
|
71
121
|
Requires-Dist: Jinja2; extra == "dev"
|
|
72
|
-
Requires-Dist: pytest
|
|
122
|
+
Requires-Dist: pytest>=8.4.2; extra == "dev"
|
|
73
123
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
74
124
|
Requires-Dist: pytest-env; extra == "dev"
|
|
75
125
|
Requires-Dist: pytest-xdist; extra == "dev"
|
|
76
126
|
Requires-Dist: pytest-vcr; extra == "dev"
|
|
77
127
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
78
|
-
Requires-Dist: pytest-rerunfailures; extra == "dev"
|
|
128
|
+
Requires-Dist: pytest-rerunfailures<16.0; extra == "dev"
|
|
79
129
|
Requires-Dist: pytest-mock; extra == "dev"
|
|
80
130
|
Requires-Dist: urllib3<2.0; extra == "dev"
|
|
81
131
|
Requires-Dist: soundfile; extra == "dev"
|
|
82
132
|
Requires-Dist: Pillow; extra == "dev"
|
|
83
|
-
Requires-Dist: gradio>=4.0.0; extra == "dev"
|
|
84
133
|
Requires-Dist: numpy; extra == "dev"
|
|
85
134
|
Requires-Dist: fastapi; extra == "dev"
|
|
86
135
|
Requires-Dist: ruff>=0.9.0; extra == "dev"
|
|
87
|
-
Requires-Dist: mypy==1.
|
|
88
|
-
Requires-Dist: libcst
|
|
136
|
+
Requires-Dist: mypy==1.15.0; extra == "dev"
|
|
137
|
+
Requires-Dist: libcst>=1.4.0; extra == "dev"
|
|
138
|
+
Requires-Dist: ty; extra == "dev"
|
|
89
139
|
Requires-Dist: typing-extensions>=4.8.0; extra == "dev"
|
|
90
140
|
Requires-Dist: types-PyYAML; extra == "dev"
|
|
91
|
-
Requires-Dist: types-requests; extra == "dev"
|
|
92
141
|
Requires-Dist: types-simplejson; extra == "dev"
|
|
93
142
|
Requires-Dist: types-toml; extra == "dev"
|
|
94
143
|
Requires-Dist: types-tqdm; extra == "dev"
|
|
95
144
|
Requires-Dist: types-urllib3; extra == "dev"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Requires-Dist: libcst==1.4.0; extra == "quality"
|
|
110
|
-
Provides-Extra: tensorflow
|
|
111
|
-
Requires-Dist: tensorflow; extra == "tensorflow"
|
|
112
|
-
Requires-Dist: pydot; extra == "tensorflow"
|
|
113
|
-
Requires-Dist: graphviz; extra == "tensorflow"
|
|
114
|
-
Provides-Extra: tensorflow-testing
|
|
115
|
-
Requires-Dist: tensorflow; extra == "tensorflow-testing"
|
|
116
|
-
Requires-Dist: keras<3.0; extra == "tensorflow-testing"
|
|
117
|
-
Provides-Extra: testing
|
|
118
|
-
Requires-Dist: InquirerPy==0.3.4; extra == "testing"
|
|
119
|
-
Requires-Dist: aiohttp; extra == "testing"
|
|
120
|
-
Requires-Dist: jedi; extra == "testing"
|
|
121
|
-
Requires-Dist: Jinja2; extra == "testing"
|
|
122
|
-
Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "testing"
|
|
123
|
-
Requires-Dist: pytest-cov; extra == "testing"
|
|
124
|
-
Requires-Dist: pytest-env; extra == "testing"
|
|
125
|
-
Requires-Dist: pytest-xdist; extra == "testing"
|
|
126
|
-
Requires-Dist: pytest-vcr; extra == "testing"
|
|
127
|
-
Requires-Dist: pytest-asyncio; extra == "testing"
|
|
128
|
-
Requires-Dist: pytest-rerunfailures; extra == "testing"
|
|
129
|
-
Requires-Dist: pytest-mock; extra == "testing"
|
|
130
|
-
Requires-Dist: urllib3<2.0; extra == "testing"
|
|
131
|
-
Requires-Dist: soundfile; extra == "testing"
|
|
132
|
-
Requires-Dist: Pillow; extra == "testing"
|
|
133
|
-
Requires-Dist: gradio>=4.0.0; extra == "testing"
|
|
134
|
-
Requires-Dist: numpy; extra == "testing"
|
|
135
|
-
Requires-Dist: fastapi; extra == "testing"
|
|
136
|
-
Provides-Extra: torch
|
|
137
|
-
Requires-Dist: torch; extra == "torch"
|
|
138
|
-
Requires-Dist: safetensors[torch]; extra == "torch"
|
|
139
|
-
Provides-Extra: typing
|
|
140
|
-
Requires-Dist: typing-extensions>=4.8.0; extra == "typing"
|
|
141
|
-
Requires-Dist: types-PyYAML; extra == "typing"
|
|
142
|
-
Requires-Dist: types-requests; extra == "typing"
|
|
143
|
-
Requires-Dist: types-simplejson; extra == "typing"
|
|
144
|
-
Requires-Dist: types-toml; extra == "typing"
|
|
145
|
-
Requires-Dist: types-tqdm; extra == "typing"
|
|
146
|
-
Requires-Dist: types-urllib3; extra == "typing"
|
|
145
|
+
Dynamic: author
|
|
146
|
+
Dynamic: author-email
|
|
147
|
+
Dynamic: classifier
|
|
148
|
+
Dynamic: description
|
|
149
|
+
Dynamic: description-content-type
|
|
150
|
+
Dynamic: home-page
|
|
151
|
+
Dynamic: keywords
|
|
152
|
+
Dynamic: license
|
|
153
|
+
Dynamic: license-file
|
|
154
|
+
Dynamic: provides-extra
|
|
155
|
+
Dynamic: requires-dist
|
|
156
|
+
Dynamic: requires-python
|
|
157
|
+
Dynamic: summary
|
|
147
158
|
|
|
148
159
|
<p align="center">
|
|
149
160
|
<picture>
|
|
@@ -171,9 +182,10 @@ Requires-Dist: types-urllib3; extra == "typing"
|
|
|
171
182
|
<p>
|
|
172
183
|
<b>English</b> |
|
|
173
184
|
<a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_de.md">Deutsch</a> |
|
|
185
|
+
<a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_fr.md">Français</a> |
|
|
174
186
|
<a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_hi.md">हिंदी</a> |
|
|
175
187
|
<a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_ko.md">한국어</a> |
|
|
176
|
-
<a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_cn.md"
|
|
188
|
+
<a href="https://github.com/huggingface/huggingface_hub/blob/main/i18n/README_cn.md">中文 (简体)</a>
|
|
177
189
|
<p>
|
|
178
190
|
</h4>
|
|
179
191
|
|
|
@@ -209,10 +221,10 @@ pip install huggingface_hub
|
|
|
209
221
|
|
|
210
222
|
If you prefer, you can also install it with [conda](https://huggingface.co/docs/huggingface_hub/en/installation#install-with-conda).
|
|
211
223
|
|
|
212
|
-
In order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want
|
|
224
|
+
In order to keep the package minimal by default, `huggingface_hub` comes with optional dependencies useful for some use cases. For example, if you want to use the MCP module, run:
|
|
213
225
|
|
|
214
226
|
```bash
|
|
215
|
-
pip install huggingface_hub[
|
|
227
|
+
pip install "huggingface_hub[mcp]"
|
|
216
228
|
```
|
|
217
229
|
|
|
218
230
|
To learn more installation and optional dependencies, check out the [installation guide](https://huggingface.co/docs/huggingface_hub/en/installation).
|
|
@@ -244,9 +256,9 @@ Files will be downloaded in a local cache folder. More details in [this guide](h
|
|
|
244
256
|
The Hugging Face Hub uses tokens to authenticate applications (see [docs](https://huggingface.co/docs/hub/security-tokens)). To log in your machine, run the following CLI:
|
|
245
257
|
|
|
246
258
|
```bash
|
|
247
|
-
|
|
259
|
+
hf auth login
|
|
248
260
|
# or using an environment variable
|
|
249
|
-
|
|
261
|
+
hf auth login --token $HUGGINGFACE_TOKEN
|
|
250
262
|
```
|
|
251
263
|
|
|
252
264
|
### Create a repository
|
|
@@ -293,7 +305,6 @@ The advantages are:
|
|
|
293
305
|
|
|
294
306
|
- Free model or dataset hosting for libraries and their users.
|
|
295
307
|
- Built-in file versioning, even with very large files, thanks to a git-based approach.
|
|
296
|
-
- Serverless inference API for all models publicly available.
|
|
297
308
|
- In-browser widgets to play with the uploaded models.
|
|
298
309
|
- Anyone can upload a new model for your library, they just need to add the corresponding tag for the model to be discoverable.
|
|
299
310
|
- Fast downloads! We use Cloudfront (a CDN) to geo-replicate downloads so they're blazing fast from anywhere on the globe.
|
|
@@ -307,5 +318,3 @@ Everyone is welcome to contribute, and we value everybody's contribution. Code i
|
|
|
307
318
|
Answering questions, helping others, reaching out and improving the documentations are immensely valuable to the community.
|
|
308
319
|
We wrote a [contribution guide](https://github.com/huggingface/huggingface_hub/blob/main/CONTRIBUTING.md) to summarize
|
|
309
320
|
how to get started to contribute to this repository.
|
|
310
|
-
|
|
311
|
-
|