huggingface-hub 0.35.1__py3-none-any.whl → 1.0.0rc1__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.

Potentially problematic release.


This version of huggingface-hub might be problematic. Click here for more details.

Files changed (127) hide show
  1. huggingface_hub/__init__.py +28 -45
  2. huggingface_hub/_commit_api.py +28 -28
  3. huggingface_hub/_commit_scheduler.py +11 -8
  4. huggingface_hub/_inference_endpoints.py +8 -8
  5. huggingface_hub/_jobs_api.py +20 -20
  6. huggingface_hub/_login.py +13 -39
  7. huggingface_hub/_oauth.py +8 -8
  8. huggingface_hub/_snapshot_download.py +14 -28
  9. huggingface_hub/_space_api.py +4 -4
  10. huggingface_hub/_tensorboard_logger.py +5 -5
  11. huggingface_hub/_upload_large_folder.py +15 -15
  12. huggingface_hub/_webhooks_payload.py +3 -3
  13. huggingface_hub/_webhooks_server.py +2 -2
  14. huggingface_hub/cli/__init__.py +0 -14
  15. huggingface_hub/cli/_cli_utils.py +80 -3
  16. huggingface_hub/cli/auth.py +104 -150
  17. huggingface_hub/cli/cache.py +102 -126
  18. huggingface_hub/cli/download.py +93 -110
  19. huggingface_hub/cli/hf.py +37 -41
  20. huggingface_hub/cli/jobs.py +689 -1017
  21. huggingface_hub/cli/lfs.py +120 -143
  22. huggingface_hub/cli/repo.py +158 -216
  23. huggingface_hub/cli/repo_files.py +50 -84
  24. huggingface_hub/cli/system.py +6 -25
  25. huggingface_hub/cli/upload.py +198 -212
  26. huggingface_hub/cli/upload_large_folder.py +90 -105
  27. huggingface_hub/commands/_cli_utils.py +2 -2
  28. huggingface_hub/commands/delete_cache.py +11 -11
  29. huggingface_hub/commands/download.py +4 -13
  30. huggingface_hub/commands/lfs.py +4 -4
  31. huggingface_hub/commands/repo_files.py +2 -2
  32. huggingface_hub/commands/tag.py +1 -3
  33. huggingface_hub/commands/upload.py +4 -4
  34. huggingface_hub/commands/upload_large_folder.py +3 -3
  35. huggingface_hub/commands/user.py +4 -5
  36. huggingface_hub/community.py +5 -5
  37. huggingface_hub/constants.py +3 -41
  38. huggingface_hub/dataclasses.py +16 -22
  39. huggingface_hub/errors.py +43 -30
  40. huggingface_hub/fastai_utils.py +8 -9
  41. huggingface_hub/file_download.py +154 -253
  42. huggingface_hub/hf_api.py +329 -558
  43. huggingface_hub/hf_file_system.py +104 -62
  44. huggingface_hub/hub_mixin.py +32 -54
  45. huggingface_hub/inference/_client.py +178 -163
  46. huggingface_hub/inference/_common.py +38 -54
  47. huggingface_hub/inference/_generated/_async_client.py +219 -259
  48. huggingface_hub/inference/_generated/types/automatic_speech_recognition.py +3 -3
  49. huggingface_hub/inference/_generated/types/base.py +10 -7
  50. huggingface_hub/inference/_generated/types/chat_completion.py +16 -16
  51. huggingface_hub/inference/_generated/types/depth_estimation.py +2 -2
  52. huggingface_hub/inference/_generated/types/document_question_answering.py +2 -2
  53. huggingface_hub/inference/_generated/types/feature_extraction.py +2 -2
  54. huggingface_hub/inference/_generated/types/fill_mask.py +2 -2
  55. huggingface_hub/inference/_generated/types/sentence_similarity.py +3 -3
  56. huggingface_hub/inference/_generated/types/summarization.py +2 -2
  57. huggingface_hub/inference/_generated/types/table_question_answering.py +4 -4
  58. huggingface_hub/inference/_generated/types/text2text_generation.py +2 -2
  59. huggingface_hub/inference/_generated/types/text_generation.py +10 -10
  60. huggingface_hub/inference/_generated/types/text_to_video.py +2 -2
  61. huggingface_hub/inference/_generated/types/token_classification.py +2 -2
  62. huggingface_hub/inference/_generated/types/translation.py +2 -2
  63. huggingface_hub/inference/_generated/types/zero_shot_classification.py +2 -2
  64. huggingface_hub/inference/_generated/types/zero_shot_image_classification.py +2 -2
  65. huggingface_hub/inference/_generated/types/zero_shot_object_detection.py +1 -3
  66. huggingface_hub/inference/_mcp/agent.py +3 -3
  67. huggingface_hub/inference/_mcp/constants.py +1 -2
  68. huggingface_hub/inference/_mcp/mcp_client.py +33 -22
  69. huggingface_hub/inference/_mcp/types.py +10 -10
  70. huggingface_hub/inference/_mcp/utils.py +4 -4
  71. huggingface_hub/inference/_providers/__init__.py +2 -13
  72. huggingface_hub/inference/_providers/_common.py +24 -25
  73. huggingface_hub/inference/_providers/black_forest_labs.py +6 -6
  74. huggingface_hub/inference/_providers/cohere.py +3 -3
  75. huggingface_hub/inference/_providers/fal_ai.py +25 -25
  76. huggingface_hub/inference/_providers/featherless_ai.py +4 -4
  77. huggingface_hub/inference/_providers/fireworks_ai.py +3 -3
  78. huggingface_hub/inference/_providers/hf_inference.py +13 -13
  79. huggingface_hub/inference/_providers/hyperbolic.py +4 -4
  80. huggingface_hub/inference/_providers/nebius.py +10 -10
  81. huggingface_hub/inference/_providers/novita.py +5 -5
  82. huggingface_hub/inference/_providers/nscale.py +4 -4
  83. huggingface_hub/inference/_providers/replicate.py +15 -15
  84. huggingface_hub/inference/_providers/sambanova.py +6 -6
  85. huggingface_hub/inference/_providers/together.py +7 -7
  86. huggingface_hub/lfs.py +24 -33
  87. huggingface_hub/repocard.py +16 -17
  88. huggingface_hub/repocard_data.py +56 -56
  89. huggingface_hub/serialization/__init__.py +0 -1
  90. huggingface_hub/serialization/_base.py +9 -9
  91. huggingface_hub/serialization/_dduf.py +7 -7
  92. huggingface_hub/serialization/_torch.py +28 -28
  93. huggingface_hub/utils/__init__.py +10 -4
  94. huggingface_hub/utils/_auth.py +5 -5
  95. huggingface_hub/utils/_cache_manager.py +31 -31
  96. huggingface_hub/utils/_deprecation.py +1 -1
  97. huggingface_hub/utils/_dotenv.py +3 -3
  98. huggingface_hub/utils/_fixes.py +0 -10
  99. huggingface_hub/utils/_git_credential.py +3 -3
  100. huggingface_hub/utils/_headers.py +7 -29
  101. huggingface_hub/utils/_http.py +369 -209
  102. huggingface_hub/utils/_pagination.py +4 -4
  103. huggingface_hub/utils/_paths.py +5 -5
  104. huggingface_hub/utils/_runtime.py +15 -13
  105. huggingface_hub/utils/_safetensors.py +21 -21
  106. huggingface_hub/utils/_subprocess.py +9 -9
  107. huggingface_hub/utils/_telemetry.py +3 -3
  108. huggingface_hub/utils/_typing.py +3 -3
  109. huggingface_hub/utils/_validators.py +53 -72
  110. huggingface_hub/utils/_xet.py +16 -16
  111. huggingface_hub/utils/_xet_progress_reporting.py +1 -1
  112. huggingface_hub/utils/insecure_hashlib.py +3 -9
  113. huggingface_hub/utils/tqdm.py +3 -3
  114. {huggingface_hub-0.35.1.dist-info → huggingface_hub-1.0.0rc1.dist-info}/METADATA +17 -26
  115. huggingface_hub-1.0.0rc1.dist-info/RECORD +161 -0
  116. huggingface_hub/inference/_providers/publicai.py +0 -6
  117. huggingface_hub/inference/_providers/scaleway.py +0 -28
  118. huggingface_hub/inference_api.py +0 -217
  119. huggingface_hub/keras_mixin.py +0 -500
  120. huggingface_hub/repository.py +0 -1477
  121. huggingface_hub/serialization/_tensorflow.py +0 -95
  122. huggingface_hub/utils/_hf_folder.py +0 -68
  123. huggingface_hub-0.35.1.dist-info/RECORD +0 -168
  124. {huggingface_hub-0.35.1.dist-info → huggingface_hub-1.0.0rc1.dist-info}/LICENSE +0 -0
  125. {huggingface_hub-0.35.1.dist-info → huggingface_hub-1.0.0rc1.dist-info}/WHEEL +0 -0
  126. {huggingface_hub-0.35.1.dist-info → huggingface_hub-1.0.0rc1.dist-info}/entry_points.txt +0 -0
  127. {huggingface_hub-0.35.1.dist-info → huggingface_hub-1.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -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, Dict, Iterator, Optional, Union
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: Dict[str, bool] = {}
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
- >>> requests.put(url, data=f)
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
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: huggingface-hub
3
- Version: 0.35.1
3
+ Version: 1.0.0rc1
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.
@@ -15,26 +15,27 @@ Classifier: License :: OSI Approved :: Apache Software License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: 3 :: Only
18
- Classifier: Programming Language :: Python :: 3.8
19
18
  Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
24
23
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
- Requires-Python: >=3.8.0
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
30
29
  Requires-Dist: packaging>=20.9
31
30
  Requires-Dist: pyyaml>=5.1
32
- Requires-Dist: requests
31
+ Requires-Dist: httpx<1,>=0.23.0
33
32
  Requires-Dist: tqdm>=4.42.1
33
+ Requires-Dist: typer-slim
34
34
  Requires-Dist: typing-extensions>=3.7.4.3
35
35
  Requires-Dist: hf-xet<2.0.0,>=1.1.3; platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "arm64" or platform_machine == "aarch64"
36
36
  Provides-Extra: all
37
37
  Requires-Dist: InquirerPy==0.3.4; extra == "all"
38
+ Requires-Dist: shellingham; extra == "all"
38
39
  Requires-Dist: aiohttp; extra == "all"
39
40
  Requires-Dist: authlib>=1.3.2; extra == "all"
40
41
  Requires-Dist: fastapi; extra == "all"
@@ -42,7 +43,7 @@ Requires-Dist: httpx; extra == "all"
42
43
  Requires-Dist: itsdangerous; extra == "all"
43
44
  Requires-Dist: jedi; extra == "all"
44
45
  Requires-Dist: Jinja2; extra == "all"
45
- Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "all"
46
+ Requires-Dist: pytest>=8.4.2; extra == "all"
46
47
  Requires-Dist: pytest-cov; extra == "all"
47
48
  Requires-Dist: pytest-env; extra == "all"
48
49
  Requires-Dist: pytest-xdist; extra == "all"
@@ -53,24 +54,24 @@ Requires-Dist: pytest-mock; extra == "all"
53
54
  Requires-Dist: urllib3<2.0; extra == "all"
54
55
  Requires-Dist: soundfile; extra == "all"
55
56
  Requires-Dist: Pillow; extra == "all"
56
- Requires-Dist: gradio>=4.0.0; extra == "all"
57
+ Requires-Dist: requests; extra == "all"
57
58
  Requires-Dist: numpy; extra == "all"
58
59
  Requires-Dist: ruff>=0.9.0; extra == "all"
60
+ Requires-Dist: mypy==1.15.0; extra == "all"
59
61
  Requires-Dist: libcst>=1.4.0; extra == "all"
60
62
  Requires-Dist: ty; extra == "all"
61
63
  Requires-Dist: typing-extensions>=4.8.0; extra == "all"
62
64
  Requires-Dist: types-PyYAML; extra == "all"
63
- Requires-Dist: types-requests; extra == "all"
64
65
  Requires-Dist: types-simplejson; extra == "all"
65
66
  Requires-Dist: types-toml; extra == "all"
66
67
  Requires-Dist: types-tqdm; extra == "all"
67
68
  Requires-Dist: types-urllib3; extra == "all"
68
- Requires-Dist: mypy<1.15.0,>=1.14.1; python_version == "3.8" and extra == "all"
69
- Requires-Dist: mypy==1.15.0; python_version >= "3.9" and extra == "all"
70
69
  Provides-Extra: cli
71
70
  Requires-Dist: InquirerPy==0.3.4; extra == "cli"
71
+ Requires-Dist: shellingham; extra == "cli"
72
72
  Provides-Extra: dev
73
73
  Requires-Dist: InquirerPy==0.3.4; extra == "dev"
74
+ Requires-Dist: shellingham; extra == "dev"
74
75
  Requires-Dist: aiohttp; extra == "dev"
75
76
  Requires-Dist: authlib>=1.3.2; extra == "dev"
76
77
  Requires-Dist: fastapi; extra == "dev"
@@ -78,7 +79,7 @@ Requires-Dist: httpx; extra == "dev"
78
79
  Requires-Dist: itsdangerous; extra == "dev"
79
80
  Requires-Dist: jedi; extra == "dev"
80
81
  Requires-Dist: Jinja2; extra == "dev"
81
- Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "dev"
82
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
82
83
  Requires-Dist: pytest-cov; extra == "dev"
83
84
  Requires-Dist: pytest-env; extra == "dev"
84
85
  Requires-Dist: pytest-xdist; extra == "dev"
@@ -89,20 +90,18 @@ Requires-Dist: pytest-mock; extra == "dev"
89
90
  Requires-Dist: urllib3<2.0; extra == "dev"
90
91
  Requires-Dist: soundfile; extra == "dev"
91
92
  Requires-Dist: Pillow; extra == "dev"
92
- Requires-Dist: gradio>=4.0.0; extra == "dev"
93
+ Requires-Dist: requests; extra == "dev"
93
94
  Requires-Dist: numpy; extra == "dev"
94
95
  Requires-Dist: ruff>=0.9.0; extra == "dev"
96
+ Requires-Dist: mypy==1.15.0; extra == "dev"
95
97
  Requires-Dist: libcst>=1.4.0; extra == "dev"
96
98
  Requires-Dist: ty; extra == "dev"
97
99
  Requires-Dist: typing-extensions>=4.8.0; extra == "dev"
98
100
  Requires-Dist: types-PyYAML; extra == "dev"
99
- Requires-Dist: types-requests; extra == "dev"
100
101
  Requires-Dist: types-simplejson; extra == "dev"
101
102
  Requires-Dist: types-toml; extra == "dev"
102
103
  Requires-Dist: types-tqdm; extra == "dev"
103
104
  Requires-Dist: types-urllib3; extra == "dev"
104
- Requires-Dist: mypy<1.15.0,>=1.14.1; python_version == "3.8" and extra == "dev"
105
- Requires-Dist: mypy==1.15.0; python_version >= "3.9" and extra == "dev"
106
105
  Provides-Extra: fastai
107
106
  Requires-Dist: toml; extra == "fastai"
108
107
  Requires-Dist: fastai>=2.4; extra == "fastai"
@@ -124,19 +123,12 @@ Requires-Dist: httpx; extra == "oauth"
124
123
  Requires-Dist: itsdangerous; extra == "oauth"
125
124
  Provides-Extra: quality
126
125
  Requires-Dist: ruff>=0.9.0; extra == "quality"
126
+ Requires-Dist: mypy==1.15.0; extra == "quality"
127
127
  Requires-Dist: libcst>=1.4.0; extra == "quality"
128
128
  Requires-Dist: ty; extra == "quality"
129
- Requires-Dist: mypy<1.15.0,>=1.14.1; python_version == "3.8" and extra == "quality"
130
- Requires-Dist: mypy==1.15.0; python_version >= "3.9" and extra == "quality"
131
- Provides-Extra: tensorflow
132
- Requires-Dist: tensorflow; extra == "tensorflow"
133
- Requires-Dist: pydot; extra == "tensorflow"
134
- Requires-Dist: graphviz; extra == "tensorflow"
135
- Provides-Extra: tensorflow-testing
136
- Requires-Dist: tensorflow; extra == "tensorflow-testing"
137
- Requires-Dist: keras<3.0; extra == "tensorflow-testing"
138
129
  Provides-Extra: testing
139
130
  Requires-Dist: InquirerPy==0.3.4; extra == "testing"
131
+ Requires-Dist: shellingham; extra == "testing"
140
132
  Requires-Dist: aiohttp; extra == "testing"
141
133
  Requires-Dist: authlib>=1.3.2; extra == "testing"
142
134
  Requires-Dist: fastapi; extra == "testing"
@@ -144,7 +136,7 @@ Requires-Dist: httpx; extra == "testing"
144
136
  Requires-Dist: itsdangerous; extra == "testing"
145
137
  Requires-Dist: jedi; extra == "testing"
146
138
  Requires-Dist: Jinja2; extra == "testing"
147
- Requires-Dist: pytest<8.2.2,>=8.1.1; extra == "testing"
139
+ Requires-Dist: pytest>=8.4.2; extra == "testing"
148
140
  Requires-Dist: pytest-cov; extra == "testing"
149
141
  Requires-Dist: pytest-env; extra == "testing"
150
142
  Requires-Dist: pytest-xdist; extra == "testing"
@@ -155,7 +147,7 @@ Requires-Dist: pytest-mock; extra == "testing"
155
147
  Requires-Dist: urllib3<2.0; extra == "testing"
156
148
  Requires-Dist: soundfile; extra == "testing"
157
149
  Requires-Dist: Pillow; extra == "testing"
158
- Requires-Dist: gradio>=4.0.0; extra == "testing"
150
+ Requires-Dist: requests; extra == "testing"
159
151
  Requires-Dist: numpy; extra == "testing"
160
152
  Provides-Extra: torch
161
153
  Requires-Dist: torch; extra == "torch"
@@ -163,7 +155,6 @@ Requires-Dist: safetensors[torch]; extra == "torch"
163
155
  Provides-Extra: typing
164
156
  Requires-Dist: typing-extensions>=4.8.0; extra == "typing"
165
157
  Requires-Dist: types-PyYAML; extra == "typing"
166
- Requires-Dist: types-requests; extra == "typing"
167
158
  Requires-Dist: types-simplejson; extra == "typing"
168
159
  Requires-Dist: types-toml; extra == "typing"
169
160
  Requires-Dist: types-tqdm; extra == "typing"
@@ -0,0 +1,161 @@
1
+ huggingface_hub/__init__.py,sha256=QK-fIP2bJRVfOAK94U51ibnhUnlmaz86Aqz5897v97w,52007
2
+ huggingface_hub/_commit_api.py,sha256=1tz3oOAd0A4797INAzIOtS3Vj9Y58wsrV3B1pXShCCY,38833
3
+ huggingface_hub/_commit_scheduler.py,sha256=Spz4u3Wpg2mz9pWkVtsLS6ljG0QD5dOD18tSRXt5YVk,14770
4
+ huggingface_hub/_inference_endpoints.py,sha256=cGiZg244nIOi2OLTqm4V8-ZUY3O0Rr7NlOmoLeHUIbY,17592
5
+ huggingface_hub/_jobs_api.py,sha256=SqybFSxQygyp8Ywem2a4WIL0kcq_hB1Dv5xV8kJFmv8,10791
6
+ huggingface_hub/_local_folder.py,sha256=2iHXNgIT3UdSt2PvCovd0NzgVxTRypKb-rvAFLK-gZU,17305
7
+ huggingface_hub/_login.py,sha256=yctn09DZiGNLJ2LGFJUUPVO7WSVhCYkEyZaS6pRxkHo,19076
8
+ huggingface_hub/_oauth.py,sha256=91zR_H235vxi-fg2YXzDgmA09j4BR3dim9VVzf6srps,18695
9
+ huggingface_hub/_snapshot_download.py,sha256=bN_Rh_DMYcPOSNjQvx3oxnJyDwOdaKNBJuNCh0z8n6w,15543
10
+ huggingface_hub/_space_api.py,sha256=aOowzC3LUytfgFrZprn9vKTQHXLpDWJKjl9X4qq_ZxQ,5464
11
+ huggingface_hub/_tensorboard_logger.py,sha256=ad0bbmIa-YzBIIt_l3aPnXUDOyRUezYEtMHIm23L_ZY,8433
12
+ huggingface_hub/_upload_large_folder.py,sha256=NLnbHTo85kSZpxNpliP8ZqFbux7XCFw60EEsqS5aCUM,30047
13
+ huggingface_hub/_webhooks_payload.py,sha256=qCZjBa5dhssg_O0yzgzxPyMpwAxLG96I4qen_HIk0Qc,3611
14
+ huggingface_hub/_webhooks_server.py,sha256=iSYiQL6fx1-tmZJvj0ntftA9-blloqEeiJEwPmjoWSw,15761
15
+ huggingface_hub/community.py,sha256=RbW37Fh8IPsTOiE6ukTdG9mjkjECdKsvcWg6wBV55mg,12192
16
+ huggingface_hub/constants.py,sha256=0wPK02ixE1drhlsEbpwi1RIQauezevkQnDB_JW3Y75c,9316
17
+ huggingface_hub/dataclasses.py,sha256=G-_CJ8UUxZANUNUd_NmJiqqlhaGt2guyIlV0v9EOwL0,17193
18
+ huggingface_hub/errors.py,sha256=vC__ajG9QCOW1ZFp4Tr6jA5kd8875_muJhaRuOVOE1s,11282
19
+ huggingface_hub/fastai_utils.py,sha256=i7x4fb35_b4UK4-PXIImn_9GuYhs3iFshsD5XgbtZSc,16647
20
+ huggingface_hub/file_download.py,sha256=C4TLrT6lzYqSa5TTbQzIB6zQGzw0nyj-YUYlrnyxu0c,74012
21
+ huggingface_hub/hf_api.py,sha256=4lCbMOiLgzsek7qmeasI6add8flB3F9c-0Emmb1eHHc,469288
22
+ huggingface_hub/hf_file_system.py,sha256=I8aB6TtBUGKCp_Gy4UocrJjK6yXTTa0s-MUILgMibVA,47916
23
+ huggingface_hub/hub_mixin.py,sha256=xQDBbxjEHVMdb333hCmjsjYsaxU7IICdgZFf8tq0toU,37063
24
+ huggingface_hub/lfs.py,sha256=zmnoEW7NLVinylPqQNuQnwqqg2sjCJTp4lOBGllvdtA,15983
25
+ huggingface_hub/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ huggingface_hub/repocard.py,sha256=sg-n9CHYXJFbrwguTO2fiSgoOqn-frz1aeDlGuTPbhA,34908
27
+ huggingface_hub/repocard_data.py,sha256=DLdOKlnQCHOOpU-e_skx0YaHxoqN9ZKIOmmMjHUqb1w,34063
28
+ huggingface_hub/cli/__init__.py,sha256=A4zmzuHD2OHjQ5zmdfcnsj0JeCzHVPtpzh-wCjInugA,606
29
+ huggingface_hub/cli/_cli_utils.py,sha256=bbd3j7TjgRFr9ihvIwpLFuc30E1FRgWY0YOW-bhmIQg,3828
30
+ huggingface_hub/cli/auth.py,sha256=8UXf03A2gggkISLaDXIkLCYuURc2A3rHyFqY-gWajCA,5177
31
+ huggingface_hub/cli/cache.py,sha256=78DjbPHqfo8kAlhZRpayEv3nhuC1Ckl3dICdljkZSII,13999
32
+ huggingface_hub/cli/download.py,sha256=5KufMvmucKHR93_KFBnnOZu1mQLpwwI8MnLqiMwnYrs,5359
33
+ huggingface_hub/cli/hf.py,sha256=Bs4cB117ijea8KsJ9CjGWFQjgkWUGAgltmahTHCE6YA,2315
34
+ huggingface_hub/cli/jobs.py,sha256=HgxxxDRaCHH62eBpihzf1SakevM3OWewPiIzWjFkYLw,23871
35
+ huggingface_hub/cli/lfs.py,sha256=UJI5nBbrt_a-lm5uU88gxD6hVu8xyQav-zBxLTv3Wzo,5895
36
+ huggingface_hub/cli/repo.py,sha256=5k0qZ15_DzAg2EJhZWr5CvVF_5j8kBV5HNPKTnuZlDs,6127
37
+ huggingface_hub/cli/repo_files.py,sha256=6d5GsLsCjqSKTSbJqCHnrRxB9kXj-yLRAtcVbQkQNMo,2799
38
+ huggingface_hub/cli/system.py,sha256=U6j_MFDnlzBLRi2LZjXMxzRcp50UMdAZ7z5tWuPVJYk,1012
39
+ huggingface_hub/cli/upload.py,sha256=4OiGfKW12gPQJBSOqcoeWyTrBUSKeVrJ43cOQ2wgtrA,11823
40
+ huggingface_hub/cli/upload_large_folder.py,sha256=8n2icgejjDPNCr4iODYokLDCJ4BF9EVIoUQW41d4ddU,4470
41
+ huggingface_hub/commands/__init__.py,sha256=AkbM2a-iGh0Vq_xAWhK3mu3uZ44km8-X5uWjKcvcrUQ,928
42
+ huggingface_hub/commands/_cli_utils.py,sha256=5ee2T6YBBCshtZlUEqVHERY9JOHxxPnVEsQJCpze7Yw,2323
43
+ huggingface_hub/commands/delete_cache.py,sha256=ePmnQG3HTmHTEuJ_iHxSVNFDgXIWdE3Ce-4S29ZgK7E,17732
44
+ huggingface_hub/commands/download.py,sha256=hQg4iKhU8RVMqzvLWyAoO4VDfuG75JOSPQyN_9UPFfg,7881
45
+ huggingface_hub/commands/env.py,sha256=qv4SmjuzUz9exo4RDMY2HqabLCKE1oRb55cBA6LN9R4,1342
46
+ huggingface_hub/commands/huggingface_cli.py,sha256=gDi7JueyiLD0bGclTEYfHPQWpAY_WBdPfHT7vkqa5v0,2654
47
+ huggingface_hub/commands/lfs.py,sha256=DY5OsbRqYvTxLXO9jr9PeWucXEQ3PEZeEKY9QwS4HlM,7330
48
+ huggingface_hub/commands/repo.py,sha256=WcRDFqUYKB0Kz0zFopegiG614ot6VOYTAf6jht0BMss,6042
49
+ huggingface_hub/commands/repo_files.py,sha256=-BQ0kcmh3cQjiF1w1weidospl4L0YAT0QeLCicBdlAg,5048
50
+ huggingface_hub/commands/scan_cache.py,sha256=gQlhBZgWkUzH4wrIYnvgV7CA4C7rvV2SuY0x2JCB7g0,8675
51
+ huggingface_hub/commands/tag.py,sha256=f76qx6wCUWLvSYACAnf_qBB5v9ZnrO_-QqMAZ8TdB0s,6344
52
+ huggingface_hub/commands/upload.py,sha256=KOOxiVA7I18vcw4BirWvZ1v1WCYsRLv6blA-6O2dp8w,14570
53
+ huggingface_hub/commands/upload_large_folder.py,sha256=RUrZ9BMyUxh1Q2reI5Xplw8qy1kO01UO6fEojYO2RmU,6248
54
+ huggingface_hub/commands/user.py,sha256=yuG7VpyKfih4qRLf5N-Dg4JcsLpIKpchsvtHZMLws5w,7522
55
+ huggingface_hub/commands/version.py,sha256=rGpCbvxImY9eQqXrshYt609Iws27R75WARmKQrIo6Ok,1390
56
+ huggingface_hub/inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
+ huggingface_hub/inference/_client.py,sha256=jEFiLsvhd_o8NUCQWHIOtSEufryOFyoFzGzW45sRGSY,157924
58
+ huggingface_hub/inference/_common.py,sha256=qS3i2R8Dz_VCb6sWt1ZqnmOt8jxPU6uSxlyq-0_9ytg,15350
59
+ huggingface_hub/inference/_generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
+ huggingface_hub/inference/_generated/_async_client.py,sha256=BFRGjET1um6FxwV8Eqi-WUtx1xphNC05SRi8qgY55Qo,161134
61
+ huggingface_hub/inference/_generated/types/__init__.py,sha256=9WvrGQ8aThtKSNzZF06j-CIE2ZuItne8FFnea1p1u38,6557
62
+ huggingface_hub/inference/_generated/types/audio_classification.py,sha256=Jg3mzfGhCSH6CfvVvgJSiFpkz6v4nNA0G4LJXacEgNc,1573
63
+ huggingface_hub/inference/_generated/types/audio_to_audio.py,sha256=2Ep4WkePL7oJwcp5nRJqApwviumGHbft9HhXE9XLHj4,891
64
+ huggingface_hub/inference/_generated/types/automatic_speech_recognition.py,sha256=FyViZkZqd0oo7Raqo48HESMAXHSnJap9HRWsKCi8Xz4,5509
65
+ huggingface_hub/inference/_generated/types/base.py,sha256=9sGEyvytJureiYimTb-pFIxG7jLe6okKzPamZuSiZyc,6896
66
+ huggingface_hub/inference/_generated/types/chat_completion.py,sha256=3-pAyko3ozXSsvE_nFl4wtALf3z5DVQSLjtAD-2tUe4,11242
67
+ huggingface_hub/inference/_generated/types/depth_estimation.py,sha256=c7IA81gZp5xIHol-7wlvy8V8UE--O1XF9rahauLVuoY,923
68
+ huggingface_hub/inference/_generated/types/document_question_answering.py,sha256=aJ_dC3pVLTHombqX3UwIFhKN_mFzpw4m89sfB2J488E,3196
69
+ huggingface_hub/inference/_generated/types/feature_extraction.py,sha256=A8nj27aQWF6XKQxNl0GsOnsNY--nN8Rnlh3nRXrThkU,1531
70
+ huggingface_hub/inference/_generated/types/fill_mask.py,sha256=E-dU2bmHlso1cei_ju_LQtYVvDZEqAM1-walZkMPa74,1702
71
+ huggingface_hub/inference/_generated/types/image_classification.py,sha256=A-Y024o8723_n8mGVos4TwdAkVL62McGeL1iIo4VzNs,1585
72
+ huggingface_hub/inference/_generated/types/image_segmentation.py,sha256=vrkI4SuP1Iq_iLXc-2pQhYY3SHN4gzvFBoZqbUHxU7o,1950
73
+ huggingface_hub/inference/_generated/types/image_to_image.py,sha256=HPz1uKXk_9xvgNUi3GV6n4lw-J3G6cdGTcW3Ou_N0l8,2044
74
+ huggingface_hub/inference/_generated/types/image_to_text.py,sha256=OaFEBAfgT-fOVzJ7xVermGf7VODhrc9-Jg38WrM7-2o,4810
75
+ huggingface_hub/inference/_generated/types/image_to_video.py,sha256=bC-L_cNsDhk4s_IdSiprJ9d1NeMGePLcUp7UPpco21w,2240
76
+ huggingface_hub/inference/_generated/types/object_detection.py,sha256=VuFlb1281qTXoSgJDmquGz-VNfEZLo2H0Rh_F6MF6ts,2000
77
+ huggingface_hub/inference/_generated/types/question_answering.py,sha256=zw38a9_9l2k1ifYZefjkioqZ4asfSRM9M4nU3gSCmAQ,2898
78
+ huggingface_hub/inference/_generated/types/sentence_similarity.py,sha256=5mDdTop4w6CpS-SulA03UVq5lBbzHuNMe8IQsTmAUPQ,1040
79
+ huggingface_hub/inference/_generated/types/summarization.py,sha256=eMJvNJmxdImVXLLMADmyDeB1YhJbN3Qd_fC6lPB7mTM,1481
80
+ huggingface_hub/inference/_generated/types/table_question_answering.py,sha256=kzT-BRnX6AwrkMqcofUZHLccxQPteg5wsJjfd9z5PjI,2281
81
+ huggingface_hub/inference/_generated/types/text2text_generation.py,sha256=S9as2uJKqCmRht_dFGws-KwQwEq1hD6w3gSLiGTMERI,1603
82
+ huggingface_hub/inference/_generated/types/text_classification.py,sha256=FarAjygLEfPofLfKeabzJ7PKEBItlHGoUNUOzyLRpL4,1445
83
+ huggingface_hub/inference/_generated/types/text_generation.py,sha256=g9pLc5XrWc1Ir0nmQ4xTa4ZauKHIJ9Pr7yM1FmZkX0Y,5916
84
+ huggingface_hub/inference/_generated/types/text_to_audio.py,sha256=1HR9Q6s9MXqtKGTvHPLGVMum5-eg7O-Pgv6Nd0v8_HU,4741
85
+ huggingface_hub/inference/_generated/types/text_to_image.py,sha256=sGGi1Fa0n5Pmd6G3I-F2SBJcJ1M7Gmqnng6sfi0AVzs,1903
86
+ huggingface_hub/inference/_generated/types/text_to_speech.py,sha256=ROFuR32ijROCeqbv81Jos0lmaA8SRWyIUsWrdD4yWow,4760
87
+ huggingface_hub/inference/_generated/types/text_to_video.py,sha256=xjC9Vp3eovuKEk7qhIeeC8VNJG8W0Kr8PEnOwOC1Ga4,1784
88
+ huggingface_hub/inference/_generated/types/token_classification.py,sha256=bpRwy_1knC11auZaeoVrCyYWBwyJLLKeiS-ypNkDTT8,1909
89
+ huggingface_hub/inference/_generated/types/translation.py,sha256=jfeWNGkZInGTOWP-Tq2dl1rGa8xuUQvZ40PxuOrsBpE,1757
90
+ huggingface_hub/inference/_generated/types/video_classification.py,sha256=TyydjQw2NRLK9sDGzJUVnkDeo848ebmCx588Ur8I9q0,1680
91
+ huggingface_hub/inference/_generated/types/visual_question_answering.py,sha256=AWrQ6qo4gZa3PGedaNpzDFqx5yOYyjhnUB6iuZEj_uo,1673
92
+ huggingface_hub/inference/_generated/types/zero_shot_classification.py,sha256=-PRiAdpXN0wxRrSVe3z8byEvuxcNby89mASU9CbfVzU,1732
93
+ huggingface_hub/inference/_generated/types/zero_shot_image_classification.py,sha256=1alzatw0RA88YUuHfrhRWQ5-Fix-iO3KcxfJV3WQB50,1481
94
+ huggingface_hub/inference/_generated/types/zero_shot_object_detection.py,sha256=sjdpVUN5zW9aYBymLVUs6i5HVk2qkUBO9ysEjHmsXVM,1605
95
+ huggingface_hub/inference/_mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
+ huggingface_hub/inference/_mcp/_cli_hacks.py,sha256=KX9HZJPa1p8ngY3mtYGGlVUXfg4vYbbBRs-8HLToP04,3284
97
+ huggingface_hub/inference/_mcp/agent.py,sha256=EgucIvjXsGqLq78oJ9WRLU19Wm1pcqGdeZKzxOoPWeE,4269
98
+ huggingface_hub/inference/_mcp/cli.py,sha256=AmSUT6wXlE6EWmI0SfQgTWYnL07322zGwwk2yMZZlBc,9640
99
+ huggingface_hub/inference/_mcp/constants.py,sha256=Ws8BujjgZWb5kPAVm4GLE_Rqse63MszHp863EWwoPCI,2487
100
+ huggingface_hub/inference/_mcp/mcp_client.py,sha256=xEBmEx8s4oLSBb5aN3EzXoqYCM2haglOltCaGyTaI98,17204
101
+ huggingface_hub/inference/_mcp/types.py,sha256=yHNfPsM9MhD06oeKdkbmrBsW-3WhUeqA26fyfRfx_bk,929
102
+ huggingface_hub/inference/_mcp/utils.py,sha256=6XBYLikJ8lknx-k1QaG_uVoVYZ0yMzyo6WgtGp7Zdds,4175
103
+ huggingface_hub/inference/_providers/__init__.py,sha256=UWL_VKr95V7l5sEkr7PYQ9O3fXHkru-6gfzHR0WUzlo,8348
104
+ huggingface_hub/inference/_providers/_common.py,sha256=lblg7JSkOns7SqxtYqwa4xHrHML2dCCGcjolAfQ-YZk,12302
105
+ huggingface_hub/inference/_providers/black_forest_labs.py,sha256=vkjK_-4epSJa2-fLnbcXFzPAgQsGKhykKwd9Np-V2iw,2846
106
+ huggingface_hub/inference/_providers/cerebras.py,sha256=QOJ-1U-os7uE7p6eUnn_P_APq-yQhx28be7c3Tq2EuA,210
107
+ huggingface_hub/inference/_providers/cohere.py,sha256=GqUyCR4j6Re-_27ItwQF2p89Yya4e__EWDP9hTSs9w0,1247
108
+ huggingface_hub/inference/_providers/fal_ai.py,sha256=XL1mZxsE6pC4xux2WinXbpwaqIMBErqXPO9uGHgupvU,9874
109
+ huggingface_hub/inference/_providers/featherless_ai.py,sha256=SceM3VsgzDSaCnzVxTFK6JepHaGStptdLlwrX-zsM2g,1376
110
+ huggingface_hub/inference/_providers/fireworks_ai.py,sha256=YfxC8wMU38qpv6xFc5HnHf6qK4x64nt-iwEDTip4C_U,1209
111
+ huggingface_hub/inference/_providers/groq.py,sha256=JTk2JV4ZOlaohho7zLAFQtk92kGVsPmLJ1hmzcwsqvQ,315
112
+ huggingface_hub/inference/_providers/hf_inference.py,sha256=dp15WQQNdbIJhLiRvH3PA651xdf7OjMx3R_1bjKqLxw,9534
113
+ huggingface_hub/inference/_providers/hyperbolic.py,sha256=LiAAiW7diy-ctrDKNYO_2N4Ght9wnvvD7hMo2NYbsNg,1979
114
+ huggingface_hub/inference/_providers/nebius.py,sha256=NQDJoNbFd9FPBA5yWTb_C42NoMeV8edpZCTRoXqtDOM,3574
115
+ huggingface_hub/inference/_providers/novita.py,sha256=AN4csxwKbRvNiaK87o9xVp9krL6mHPk6iv5iat87skA,2508
116
+ huggingface_hub/inference/_providers/nscale.py,sha256=RkyvmYtQbs2RPenF_pxDPMUMZM_botT21zqfVe2hT5Y,1796
117
+ huggingface_hub/inference/_providers/openai.py,sha256=GCVYeNdjWIgpQQ7E_Xv8IebmdhTi0S6WfFosz3nLtps,1089
118
+ huggingface_hub/inference/_providers/replicate.py,sha256=MBvjI-4IH8Antqr_8c3MRrBjAzElA3sAmEzeRVpIsPI,3814
119
+ huggingface_hub/inference/_providers/sambanova.py,sha256=t-J89tab8wut62jXSXl7pAK5mCrovwdgtvbDYK1DHis,2031
120
+ huggingface_hub/inference/_providers/together.py,sha256=q32zFvXhmRogWXMSaEFVYS8m9blXI_oy7KPdeal7Wwg,3433
121
+ huggingface_hub/serialization/__init__.py,sha256=jCiw_vVQYW52gwVfWiqgocf2Q19kGTQlRGVpf-4SLP8,963
122
+ huggingface_hub/serialization/_base.py,sha256=EeHZchLgrkO1w3Mwc0LAY8itmrS1F7-Gd6C6l1rThU4,8114
123
+ huggingface_hub/serialization/_dduf.py,sha256=eyUREtvL7od9SSYKrGcCayF29w3xcP1qXTx7RntWp9k,15411
124
+ huggingface_hub/serialization/_torch.py,sha256=IYTjHRgm2o5MQVF2n-4dKC0K6hEW-z-DFlsSRiPX2bI,45177
125
+ huggingface_hub/templates/datasetcard_template.md,sha256=W-EMqR6wndbrnZorkVv56URWPG49l7MATGeI015kTvs,5503
126
+ huggingface_hub/templates/modelcard_template.md,sha256=4AqArS3cqdtbit5Bo-DhjcnDFR-pza5hErLLTPM4Yuc,6870
127
+ huggingface_hub/utils/__init__.py,sha256=o0vivDNuvQI-0yW_imf9GtbEYPRkt3mcY3wkeF1bGT4,3822
128
+ huggingface_hub/utils/_auth.py,sha256=TAz8pjk1lP7gseit8Trl2LygKun9unMEBWg_36EeDkA,8280
129
+ huggingface_hub/utils/_cache_assets.py,sha256=kai77HPQMfYpROouMBQCr_gdBCaeTm996Sqj0dExbNg,5728
130
+ huggingface_hub/utils/_cache_manager.py,sha256=d9WULNC7NtUJgkDTbNPVpp5JFkQltkdpszLkRgA3Z5s,34490
131
+ huggingface_hub/utils/_chunk_utils.py,sha256=kRCaj5228_vKcyLWspd8Xq01f17Jz6ds5Sr9ed5d_RU,2130
132
+ huggingface_hub/utils/_datetime.py,sha256=kCS5jaKV25kOncX1xujbXsz5iDLcjLcLw85semGNzxQ,2770
133
+ huggingface_hub/utils/_deprecation.py,sha256=4tWi3vBSdvnhA0z_Op-tkAQ0xrJ4TUb0HbPhMiXUnOs,4872
134
+ huggingface_hub/utils/_dotenv.py,sha256=2LLdzpA-LzLxO15GLb9WKT5IGrTurIRmFPrMX1yDzsU,2011
135
+ huggingface_hub/utils/_experimental.py,sha256=3-c8irbn9sJr2CwWbzhGkIrdXKg8_x7BifhHFy32ei8,2470
136
+ huggingface_hub/utils/_fixes.py,sha256=xQZzfwLqZV8-gNcw9mrZ-M1acA6NZHszI_-cSZIWN-U,3978
137
+ huggingface_hub/utils/_git_credential.py,sha256=4B77QzeiPxCwK6BWZgUc1avzRKpna3wYlhVg7AuSCzA,4613
138
+ huggingface_hub/utils/_headers.py,sha256=k_ApvA8fJGHc0yNp2IFY8wySM9MQ5UZEpjr1g-fpRJ4,8060
139
+ huggingface_hub/utils/_http.py,sha256=Wbxl92nI6elfx8s_BhwB79_jYqK21IwuqDO0o3pbyEU,31169
140
+ huggingface_hub/utils/_lfs.py,sha256=EC0Oz6Wiwl8foRNkUOzrETXzAWlbgpnpxo5a410ovFY,3957
141
+ huggingface_hub/utils/_pagination.py,sha256=wEHEWhCu9vN5pv51t7ixSGe13g63kS6AJM4P53eY9M4,1894
142
+ huggingface_hub/utils/_paths.py,sha256=WCR2WbqDJLdNlU4XZNXXNmGct3OiDwPesGYrq41T2wE,5036
143
+ huggingface_hub/utils/_runtime.py,sha256=ppfRLzIGTLnkavjA3w63xOpj562byGTe-RZbcziJ-MQ,11467
144
+ huggingface_hub/utils/_safetensors.py,sha256=2_xbCsDPsCwR1tyBjJ5MoOHsX4ksocjzc4jS7oGe7_s,4439
145
+ huggingface_hub/utils/_subprocess.py,sha256=9qDWT1a2QF2TmXOQJDlPK6LwzYl9XjXeRadQPn15U14,4612
146
+ huggingface_hub/utils/_telemetry.py,sha256=a7t0jaOUPVNxbDWi4KQgVf8vSpZv0I-tK2HwlAowvEE,4884
147
+ huggingface_hub/utils/_typing.py,sha256=cC9p6E8hG2LId8sFWJ9H-cpQozv3asuoww_XiA1-XWI,3617
148
+ huggingface_hub/utils/_validators.py,sha256=Cf0ovPuhiOICoYIIks83rNL7x5N-PVZrotk87HzKyTM,8361
149
+ huggingface_hub/utils/_xet.py,sha256=P9b4lc4bJfOSZ7OVO-fg26_ayN0ESb_f1nQ7Bx9ZLfg,7297
150
+ huggingface_hub/utils/_xet_progress_reporting.py,sha256=bxwanhLxigDASflFZVt7S8eENIviguyVg1Q9vFtmDf8,6169
151
+ huggingface_hub/utils/endpoint_helpers.py,sha256=9VtIAlxQ5H_4y30sjCAgbu7XCqAtNLC7aRYxaNn0hLI,2366
152
+ huggingface_hub/utils/insecure_hashlib.py,sha256=z3dVUFvdBZ8kQI_8Vzvvlr3ims-EBiY-SYPdnzIKOkw,1008
153
+ huggingface_hub/utils/logging.py,sha256=0A8fF1yh3L9Ka_bCDX2ml4U5Ht0tY8Dr3JcbRvWFuwo,4909
154
+ huggingface_hub/utils/sha.py,sha256=OFnNGCba0sNcT2gUwaVCJnldxlltrHHe0DS_PCpV3C4,2134
155
+ huggingface_hub/utils/tqdm.py,sha256=-9gfgNA8bg5v5YBToSuB6noClI3a6YaGeFZP61IWmeY,10662
156
+ huggingface_hub-1.0.0rc1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
157
+ huggingface_hub-1.0.0rc1.dist-info/METADATA,sha256=qAYYCe9OOP8U3HWTlCkQP_n2fN6pO4UNiP9t_WxMKJc,14162
158
+ huggingface_hub-1.0.0rc1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
159
+ huggingface_hub-1.0.0rc1.dist-info/entry_points.txt,sha256=HIzLhjwPTO7U_ncpW4AkmzAuaadr1ajmYagW5mdb5TM,217
160
+ huggingface_hub-1.0.0rc1.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
161
+ huggingface_hub-1.0.0rc1.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- from ._common import BaseConversationalTask
2
-
3
-
4
- class PublicAIConversationalTask(BaseConversationalTask):
5
- def __init__(self):
6
- super().__init__(provider="publicai", base_url="https://api.publicai.co")
@@ -1,28 +0,0 @@
1
- from typing import Any, Dict, Optional, Union
2
-
3
- from huggingface_hub.inference._common import RequestParameters, _as_dict
4
-
5
- from ._common import BaseConversationalTask, InferenceProviderMapping, TaskProviderHelper, filter_none
6
-
7
-
8
- class ScalewayConversationalTask(BaseConversationalTask):
9
- def __init__(self):
10
- super().__init__(provider="scaleway", base_url="https://api.scaleway.ai")
11
-
12
-
13
- class ScalewayFeatureExtractionTask(TaskProviderHelper):
14
- def __init__(self):
15
- super().__init__(provider="scaleway", base_url="https://api.scaleway.ai", task="feature-extraction")
16
-
17
- def _prepare_route(self, mapped_model: str, api_key: str) -> str:
18
- return "/v1/embeddings"
19
-
20
- def _prepare_payload_as_dict(
21
- self, inputs: Any, parameters: Dict, provider_mapping_info: InferenceProviderMapping
22
- ) -> Optional[Dict]:
23
- parameters = filter_none(parameters)
24
- return {"input": inputs, "model": provider_mapping_info.provider_id, **parameters}
25
-
26
- def get_response(self, response: Union[bytes, Dict], request_params: Optional[RequestParameters] = None) -> Any:
27
- embeddings = _as_dict(response)["data"]
28
- return [embedding["embedding"] for embedding in embeddings]
@@ -1,217 +0,0 @@
1
- import io
2
- from typing import Any, Dict, List, Optional, Union
3
-
4
- from . import constants
5
- from .hf_api import HfApi
6
- from .utils import build_hf_headers, get_session, is_pillow_available, logging, validate_hf_hub_args
7
- from .utils._deprecation import _deprecate_method
8
-
9
-
10
- logger = logging.get_logger(__name__)
11
-
12
-
13
- ALL_TASKS = [
14
- # NLP
15
- "text-classification",
16
- "token-classification",
17
- "table-question-answering",
18
- "question-answering",
19
- "zero-shot-classification",
20
- "translation",
21
- "summarization",
22
- "conversational",
23
- "feature-extraction",
24
- "text-generation",
25
- "text2text-generation",
26
- "fill-mask",
27
- "sentence-similarity",
28
- # Audio
29
- "text-to-speech",
30
- "automatic-speech-recognition",
31
- "audio-to-audio",
32
- "audio-classification",
33
- "voice-activity-detection",
34
- # Computer vision
35
- "image-classification",
36
- "object-detection",
37
- "image-segmentation",
38
- "text-to-image",
39
- "image-to-image",
40
- # Others
41
- "tabular-classification",
42
- "tabular-regression",
43
- ]
44
-
45
-
46
- class InferenceApi:
47
- """Client to configure requests and make calls to the HuggingFace Inference API.
48
-
49
- Example:
50
-
51
- ```python
52
- >>> from huggingface_hub.inference_api import InferenceApi
53
-
54
- >>> # Mask-fill example
55
- >>> inference = InferenceApi("bert-base-uncased")
56
- >>> inference(inputs="The goal of life is [MASK].")
57
- [{'sequence': 'the goal of life is life.', 'score': 0.10933292657136917, 'token': 2166, 'token_str': 'life'}]
58
-
59
- >>> # Question Answering example
60
- >>> inference = InferenceApi("deepset/roberta-base-squad2")
61
- >>> inputs = {
62
- ... "question": "What's my name?",
63
- ... "context": "My name is Clara and I live in Berkeley.",
64
- ... }
65
- >>> inference(inputs)
66
- {'score': 0.9326569437980652, 'start': 11, 'end': 16, 'answer': 'Clara'}
67
-
68
- >>> # Zero-shot example
69
- >>> inference = InferenceApi("typeform/distilbert-base-uncased-mnli")
70
- >>> inputs = "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!"
71
- >>> params = {"candidate_labels": ["refund", "legal", "faq"]}
72
- >>> inference(inputs, params)
73
- {'sequence': 'Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!', 'labels': ['refund', 'faq', 'legal'], 'scores': [0.9378499388694763, 0.04914155602455139, 0.013008488342165947]}
74
-
75
- >>> # Overriding configured task
76
- >>> inference = InferenceApi("bert-base-uncased", task="feature-extraction")
77
-
78
- >>> # Text-to-image
79
- >>> inference = InferenceApi("stabilityai/stable-diffusion-2-1")
80
- >>> inference("cat")
81
- <PIL.PngImagePlugin.PngImageFile image (...)>
82
-
83
- >>> # Return as raw response to parse the output yourself
84
- >>> inference = InferenceApi("mio/amadeus")
85
- >>> response = inference("hello world", raw_response=True)
86
- >>> response.headers
87
- {"Content-Type": "audio/flac", ...}
88
- >>> response.content # raw bytes from server
89
- b'(...)'
90
- ```
91
- """
92
-
93
- @validate_hf_hub_args
94
- @_deprecate_method(
95
- version="1.0",
96
- message=(
97
- "`InferenceApi` client is deprecated in favor of the more feature-complete `InferenceClient`. Check out"
98
- " this guide to learn how to convert your script to use it:"
99
- " https://huggingface.co/docs/huggingface_hub/guides/inference#legacy-inferenceapi-client."
100
- ),
101
- )
102
- def __init__(
103
- self,
104
- repo_id: str,
105
- task: Optional[str] = None,
106
- token: Optional[str] = None,
107
- gpu: bool = False,
108
- ):
109
- """Inits headers and API call information.
110
-
111
- Args:
112
- repo_id (``str``):
113
- Id of repository (e.g. `user/bert-base-uncased`).
114
- task (``str``, `optional`, defaults ``None``):
115
- Whether to force a task instead of using task specified in the
116
- repository.
117
- token (`str`, `optional`):
118
- The API token to use as HTTP bearer authorization. This is not
119
- the authentication token. You can find the token in
120
- https://huggingface.co/settings/token. Alternatively, you can
121
- find both your organizations and personal API tokens using
122
- `HfApi().whoami(token)`.
123
- gpu (`bool`, `optional`, defaults `False`):
124
- Whether to use GPU instead of CPU for inference(requires Startup
125
- plan at least).
126
- """
127
- self.options = {"wait_for_model": True, "use_gpu": gpu}
128
- self.headers = build_hf_headers(token=token)
129
-
130
- # Configure task
131
- model_info = HfApi(token=token).model_info(repo_id=repo_id)
132
- if not model_info.pipeline_tag and not task:
133
- raise ValueError(
134
- "Task not specified in the repository. Please add it to the model card"
135
- " using pipeline_tag"
136
- " (https://huggingface.co/docs#how-is-a-models-type-of-inference-api-and-widget-determined)"
137
- )
138
-
139
- if task and task != model_info.pipeline_tag:
140
- if task not in ALL_TASKS:
141
- raise ValueError(f"Invalid task {task}. Make sure it's valid.")
142
-
143
- logger.warning(
144
- "You're using a different task than the one specified in the"
145
- " repository. Be sure to know what you're doing :)"
146
- )
147
- self.task = task
148
- else:
149
- assert model_info.pipeline_tag is not None, "Pipeline tag cannot be None"
150
- self.task = model_info.pipeline_tag
151
-
152
- self.api_url = f"{constants.INFERENCE_ENDPOINT}/pipeline/{self.task}/{repo_id}"
153
-
154
- def __repr__(self):
155
- # Do not add headers to repr to avoid leaking token.
156
- return f"InferenceAPI(api_url='{self.api_url}', task='{self.task}', options={self.options})"
157
-
158
- def __call__(
159
- self,
160
- inputs: Optional[Union[str, Dict, List[str], List[List[str]]]] = None,
161
- params: Optional[Dict] = None,
162
- data: Optional[bytes] = None,
163
- raw_response: bool = False,
164
- ) -> Any:
165
- """Make a call to the Inference API.
166
-
167
- Args:
168
- inputs (`str` or `Dict` or `List[str]` or `List[List[str]]`, *optional*):
169
- Inputs for the prediction.
170
- params (`Dict`, *optional*):
171
- Additional parameters for the models. Will be sent as `parameters` in the
172
- payload.
173
- data (`bytes`, *optional*):
174
- Bytes content of the request. In this case, leave `inputs` and `params` empty.
175
- raw_response (`bool`, defaults to `False`):
176
- If `True`, the raw `Response` object is returned. You can parse its content
177
- as preferred. By default, the content is parsed into a more practical format
178
- (json dictionary or PIL Image for example).
179
- """
180
- # Build payload
181
- payload: Dict[str, Any] = {
182
- "options": self.options,
183
- }
184
- if inputs:
185
- payload["inputs"] = inputs
186
- if params:
187
- payload["parameters"] = params
188
-
189
- # Make API call
190
- response = get_session().post(self.api_url, headers=self.headers, json=payload, data=data)
191
-
192
- # Let the user handle the response
193
- if raw_response:
194
- return response
195
-
196
- # By default, parse the response for the user.
197
- content_type = response.headers.get("Content-Type") or ""
198
- if content_type.startswith("image"):
199
- if not is_pillow_available():
200
- raise ImportError(
201
- f"Task '{self.task}' returned as image but Pillow is not installed."
202
- " Please install it (`pip install Pillow`) or pass"
203
- " `raw_response=True` to get the raw `Response` object and parse"
204
- " the image by yourself."
205
- )
206
-
207
- from PIL import Image
208
-
209
- return Image.open(io.BytesIO(response.content))
210
- elif content_type == "application/json":
211
- return response.json()
212
- else:
213
- raise NotImplementedError(
214
- f"{content_type} output type is not implemented yet. You can pass"
215
- " `raw_response=True` to get the raw `Response` object and parse the"
216
- " output by yourself."
217
- )