huggingface-hub 0.33.5__py3-none-any.whl → 0.34.0rc0__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 (68) hide show
  1. huggingface_hub/__init__.py +487 -525
  2. huggingface_hub/_commit_api.py +21 -28
  3. huggingface_hub/_jobs_api.py +145 -0
  4. huggingface_hub/_local_folder.py +7 -1
  5. huggingface_hub/_login.py +5 -5
  6. huggingface_hub/_oauth.py +1 -1
  7. huggingface_hub/_snapshot_download.py +11 -6
  8. huggingface_hub/_upload_large_folder.py +46 -23
  9. huggingface_hub/cli/__init__.py +27 -0
  10. huggingface_hub/cli/_cli_utils.py +69 -0
  11. huggingface_hub/cli/auth.py +210 -0
  12. huggingface_hub/cli/cache.py +405 -0
  13. huggingface_hub/cli/download.py +181 -0
  14. huggingface_hub/cli/hf.py +66 -0
  15. huggingface_hub/cli/jobs.py +522 -0
  16. huggingface_hub/cli/lfs.py +198 -0
  17. huggingface_hub/cli/repo.py +243 -0
  18. huggingface_hub/cli/repo_files.py +128 -0
  19. huggingface_hub/cli/system.py +52 -0
  20. huggingface_hub/cli/upload.py +316 -0
  21. huggingface_hub/cli/upload_large_folder.py +132 -0
  22. huggingface_hub/commands/_cli_utils.py +5 -0
  23. huggingface_hub/commands/delete_cache.py +3 -1
  24. huggingface_hub/commands/download.py +4 -0
  25. huggingface_hub/commands/env.py +3 -0
  26. huggingface_hub/commands/huggingface_cli.py +2 -0
  27. huggingface_hub/commands/repo.py +4 -0
  28. huggingface_hub/commands/repo_files.py +4 -0
  29. huggingface_hub/commands/scan_cache.py +3 -1
  30. huggingface_hub/commands/tag.py +3 -1
  31. huggingface_hub/commands/upload.py +4 -0
  32. huggingface_hub/commands/upload_large_folder.py +3 -1
  33. huggingface_hub/commands/user.py +11 -1
  34. huggingface_hub/commands/version.py +3 -0
  35. huggingface_hub/constants.py +1 -0
  36. huggingface_hub/file_download.py +16 -5
  37. huggingface_hub/hf_api.py +519 -7
  38. huggingface_hub/hf_file_system.py +8 -16
  39. huggingface_hub/hub_mixin.py +3 -3
  40. huggingface_hub/inference/_client.py +38 -39
  41. huggingface_hub/inference/_common.py +38 -11
  42. huggingface_hub/inference/_generated/_async_client.py +50 -51
  43. huggingface_hub/inference/_generated/types/__init__.py +1 -0
  44. huggingface_hub/inference/_generated/types/image_to_video.py +60 -0
  45. huggingface_hub/inference/_mcp/cli.py +36 -18
  46. huggingface_hub/inference/_mcp/constants.py +8 -0
  47. huggingface_hub/inference/_mcp/types.py +3 -0
  48. huggingface_hub/inference/_providers/__init__.py +4 -1
  49. huggingface_hub/inference/_providers/_common.py +3 -6
  50. huggingface_hub/inference/_providers/fal_ai.py +85 -42
  51. huggingface_hub/inference/_providers/hf_inference.py +17 -9
  52. huggingface_hub/inference/_providers/replicate.py +19 -1
  53. huggingface_hub/keras_mixin.py +2 -2
  54. huggingface_hub/repocard.py +1 -1
  55. huggingface_hub/repository.py +2 -2
  56. huggingface_hub/utils/_auth.py +1 -1
  57. huggingface_hub/utils/_cache_manager.py +2 -2
  58. huggingface_hub/utils/_dotenv.py +51 -0
  59. huggingface_hub/utils/_headers.py +1 -1
  60. huggingface_hub/utils/_runtime.py +1 -1
  61. huggingface_hub/utils/_xet.py +6 -2
  62. huggingface_hub/utils/_xet_progress_reporting.py +141 -0
  63. {huggingface_hub-0.33.5.dist-info → huggingface_hub-0.34.0rc0.dist-info}/METADATA +7 -8
  64. {huggingface_hub-0.33.5.dist-info → huggingface_hub-0.34.0rc0.dist-info}/RECORD +68 -51
  65. {huggingface_hub-0.33.5.dist-info → huggingface_hub-0.34.0rc0.dist-info}/entry_points.txt +1 -0
  66. {huggingface_hub-0.33.5.dist-info → huggingface_hub-0.34.0rc0.dist-info}/LICENSE +0 -0
  67. {huggingface_hub-0.33.5.dist-info → huggingface_hub-0.34.0rc0.dist-info}/WHEEL +0 -0
  68. {huggingface_hub-0.33.5.dist-info → huggingface_hub-0.34.0rc0.dist-info}/top_level.txt +0 -0
@@ -45,7 +45,8 @@ import os
45
45
  import sys
46
46
  from typing import TYPE_CHECKING
47
47
 
48
- __version__ = "0.33.5"
48
+
49
+ __version__ = "0.34.0.rc0"
49
50
 
50
51
  # Alphabetical order of definitions is ensured in tests
51
52
  # WARNING: any comment added in this dictionary definition will be lost when
@@ -61,6 +62,12 @@ _SUBMOD_ATTRS = {
61
62
  "InferenceEndpointTimeoutError",
62
63
  "InferenceEndpointType",
63
64
  ],
65
+ "_jobs_api": [
66
+ "JobInfo",
67
+ "JobOwner",
68
+ "JobStage",
69
+ "JobStatus",
70
+ ],
64
71
  "_login": [
65
72
  "auth_list",
66
73
  "auth_switch",
@@ -164,6 +171,7 @@ _SUBMOD_ATTRS = {
164
171
  "add_space_variable",
165
172
  "auth_check",
166
173
  "cancel_access_request",
174
+ "cancel_job",
167
175
  "change_discussion_status",
168
176
  "comment_discussion",
169
177
  "create_branch",
@@ -193,6 +201,7 @@ _SUBMOD_ATTRS = {
193
201
  "duplicate_space",
194
202
  "edit_discussion_comment",
195
203
  "enable_webhook",
204
+ "fetch_job_logs",
196
205
  "file_exists",
197
206
  "get_collection",
198
207
  "get_dataset_tags",
@@ -209,11 +218,13 @@ _SUBMOD_ATTRS = {
209
218
  "get_user_overview",
210
219
  "get_webhook",
211
220
  "grant_access",
221
+ "inspect_job",
212
222
  "list_accepted_access_requests",
213
223
  "list_collections",
214
224
  "list_datasets",
215
225
  "list_inference_catalog",
216
226
  "list_inference_endpoints",
227
+ "list_jobs",
217
228
  "list_lfs_files",
218
229
  "list_liked_repos",
219
230
  "list_models",
@@ -250,6 +261,8 @@ _SUBMOD_ATTRS = {
250
261
  "resume_inference_endpoint",
251
262
  "revision_exists",
252
263
  "run_as_future",
264
+ "run_job",
265
+ "run_uv_job",
253
266
  "scale_to_zero_inference_endpoint",
254
267
  "set_space_sleep_time",
255
268
  "space_info",
@@ -359,6 +372,10 @@ _SUBMOD_ATTRS = {
359
372
  "ImageToTextInput",
360
373
  "ImageToTextOutput",
361
374
  "ImageToTextParameters",
375
+ "ImageToVideoInput",
376
+ "ImageToVideoOutput",
377
+ "ImageToVideoParameters",
378
+ "ImageToVideoTargetSize",
362
379
  "ObjectDetectionBoundingBox",
363
380
  "ObjectDetectionInput",
364
381
  "ObjectDetectionOutputElement",
@@ -647,6 +664,10 @@ __all__ = [
647
664
  "ImageToTextInput",
648
665
  "ImageToTextOutput",
649
666
  "ImageToTextParameters",
667
+ "ImageToVideoInput",
668
+ "ImageToVideoOutput",
669
+ "ImageToVideoParameters",
670
+ "ImageToVideoTargetSize",
650
671
  "InferenceApi",
651
672
  "InferenceClient",
652
673
  "InferenceEndpoint",
@@ -655,6 +676,10 @@ __all__ = [
655
676
  "InferenceEndpointTimeoutError",
656
677
  "InferenceEndpointType",
657
678
  "InferenceTimeoutError",
679
+ "JobInfo",
680
+ "JobOwner",
681
+ "JobStage",
682
+ "JobStatus",
658
683
  "KerasModelHubMixin",
659
684
  "MCPClient",
660
685
  "ModelCard",
@@ -791,6 +816,7 @@ __all__ = [
791
816
  "auth_switch",
792
817
  "cached_assets_path",
793
818
  "cancel_access_request",
819
+ "cancel_job",
794
820
  "change_discussion_status",
795
821
  "comment_discussion",
796
822
  "configure_http_backend",
@@ -824,6 +850,7 @@ __all__ = [
824
850
  "enable_webhook",
825
851
  "export_entries_as_dduf",
826
852
  "export_folder_as_dduf",
853
+ "fetch_job_logs",
827
854
  "file_exists",
828
855
  "from_pretrained_fastai",
829
856
  "from_pretrained_keras",
@@ -850,12 +877,14 @@ __all__ = [
850
877
  "grant_access",
851
878
  "hf_hub_download",
852
879
  "hf_hub_url",
880
+ "inspect_job",
853
881
  "interpreter_login",
854
882
  "list_accepted_access_requests",
855
883
  "list_collections",
856
884
  "list_datasets",
857
885
  "list_inference_catalog",
858
886
  "list_inference_endpoints",
887
+ "list_jobs",
859
888
  "list_lfs_files",
860
889
  "list_liked_repos",
861
890
  "list_models",
@@ -906,6 +935,8 @@ __all__ = [
906
935
  "resume_inference_endpoint",
907
936
  "revision_exists",
908
937
  "run_as_future",
938
+ "run_job",
939
+ "run_uv_job",
909
940
  "save_pretrained_keras",
910
941
  "save_torch_model",
911
942
  "save_torch_state_dict",
@@ -1036,533 +1067,464 @@ if os.environ.get("EAGER_IMPORT", ""):
1036
1067
  # ```
1037
1068
  if TYPE_CHECKING: # pragma: no cover
1038
1069
  from ._commit_scheduler import CommitScheduler # noqa: F401
1039
- from ._inference_endpoints import InferenceEndpoint # noqa: F401
1040
- from ._inference_endpoints import InferenceEndpointError # noqa: F401
1041
- from ._inference_endpoints import InferenceEndpointStatus # noqa: F401
1042
- from ._inference_endpoints import \
1043
- InferenceEndpointTimeoutError # noqa: F401
1044
- from ._inference_endpoints import InferenceEndpointType # noqa: F401
1045
- from ._login import auth_list # noqa: F401
1046
- from ._login import auth_switch # noqa: F401
1047
- from ._login import interpreter_login # noqa: F401
1048
- from ._login import login # noqa: F401
1049
- from ._login import logout # noqa: F401
1050
- from ._login import notebook_login # noqa: F401
1051
- from ._oauth import OAuthInfo # noqa: F401
1052
- from ._oauth import OAuthOrgInfo # noqa: F401
1053
- from ._oauth import OAuthUserInfo # noqa: F401
1054
- from ._oauth import attach_huggingface_oauth # noqa: F401
1055
- from ._oauth import parse_huggingface_oauth # noqa: F401
1070
+ from ._inference_endpoints import (
1071
+ InferenceEndpoint, # noqa: F401
1072
+ InferenceEndpointError, # noqa: F401
1073
+ InferenceEndpointStatus, # noqa: F401
1074
+ InferenceEndpointTimeoutError, # noqa: F401
1075
+ InferenceEndpointType, # noqa: F401
1076
+ )
1077
+ from ._jobs_api import (
1078
+ JobInfo, # noqa: F401
1079
+ JobOwner, # noqa: F401
1080
+ JobStage, # noqa: F401
1081
+ JobStatus, # noqa: F401
1082
+ )
1083
+ from ._login import (
1084
+ auth_list, # noqa: F401
1085
+ auth_switch, # noqa: F401
1086
+ interpreter_login, # noqa: F401
1087
+ login, # noqa: F401
1088
+ logout, # noqa: F401
1089
+ notebook_login, # noqa: F401
1090
+ )
1091
+ from ._oauth import (
1092
+ OAuthInfo, # noqa: F401
1093
+ OAuthOrgInfo, # noqa: F401
1094
+ OAuthUserInfo, # noqa: F401
1095
+ attach_huggingface_oauth, # noqa: F401
1096
+ parse_huggingface_oauth, # noqa: F401
1097
+ )
1056
1098
  from ._snapshot_download import snapshot_download # noqa: F401
1057
- from ._space_api import SpaceHardware # noqa: F401
1058
- from ._space_api import SpaceRuntime # noqa: F401
1059
- from ._space_api import SpaceStage # noqa: F401
1060
- from ._space_api import SpaceStorage # noqa: F401
1061
- from ._space_api import SpaceVariable # noqa: F401
1099
+ from ._space_api import (
1100
+ SpaceHardware, # noqa: F401
1101
+ SpaceRuntime, # noqa: F401
1102
+ SpaceStage, # noqa: F401
1103
+ SpaceStorage, # noqa: F401
1104
+ SpaceVariable, # noqa: F401
1105
+ )
1062
1106
  from ._tensorboard_logger import HFSummaryWriter # noqa: F401
1063
- from ._webhooks_payload import WebhookPayload # noqa: F401
1064
- from ._webhooks_payload import WebhookPayloadComment # noqa: F401
1065
- from ._webhooks_payload import WebhookPayloadDiscussion # noqa: F401
1066
- from ._webhooks_payload import \
1067
- WebhookPayloadDiscussionChanges # noqa: F401
1068
- from ._webhooks_payload import WebhookPayloadEvent # noqa: F401
1069
- from ._webhooks_payload import WebhookPayloadMovedTo # noqa: F401
1070
- from ._webhooks_payload import WebhookPayloadRepo # noqa: F401
1071
- from ._webhooks_payload import WebhookPayloadUrl # noqa: F401
1072
- from ._webhooks_payload import WebhookPayloadWebhook # noqa: F401
1073
- from ._webhooks_server import WebhooksServer # noqa: F401
1074
- from ._webhooks_server import webhook_endpoint # noqa: F401
1075
- from .community import Discussion # noqa: F401
1076
- from .community import DiscussionComment # noqa: F401
1077
- from .community import DiscussionCommit # noqa: F401
1078
- from .community import DiscussionEvent # noqa: F401
1079
- from .community import DiscussionStatusChange # noqa: F401
1080
- from .community import DiscussionTitleChange # noqa: F401
1081
- from .community import DiscussionWithDetails # noqa: F401
1082
- from .constants import CONFIG_NAME # noqa: F401
1083
- from .constants import FLAX_WEIGHTS_NAME # noqa: F401
1084
- from .constants import HUGGINGFACE_CO_URL_HOME # noqa: F401
1085
- from .constants import HUGGINGFACE_CO_URL_TEMPLATE # noqa: F401
1086
- from .constants import PYTORCH_WEIGHTS_NAME # noqa: F401
1087
- from .constants import REPO_TYPE_DATASET # noqa: F401
1088
- from .constants import REPO_TYPE_MODEL # noqa: F401
1089
- from .constants import REPO_TYPE_SPACE # noqa: F401
1090
- from .constants import TF2_WEIGHTS_NAME # noqa: F401
1091
- from .constants import TF_WEIGHTS_NAME # noqa: F401
1092
- from .fastai_utils import _save_pretrained_fastai # noqa: F401
1093
- from .fastai_utils import from_pretrained_fastai # noqa: F401
1094
- from .fastai_utils import push_to_hub_fastai # noqa: F401
1095
- from .file_download import _CACHED_NO_EXIST # noqa: F401
1096
- from .file_download import HfFileMetadata # noqa: F401
1097
- from .file_download import get_hf_file_metadata # noqa: F401
1098
- from .file_download import hf_hub_download # noqa: F401
1099
- from .file_download import hf_hub_url # noqa: F401
1100
- from .file_download import try_to_load_from_cache # noqa: F401
1101
- from .hf_api import Collection # noqa: F401
1102
- from .hf_api import CollectionItem # noqa: F401
1103
- from .hf_api import CommitInfo # noqa: F401
1104
- from .hf_api import CommitOperation # noqa: F401
1105
- from .hf_api import CommitOperationAdd # noqa: F401
1106
- from .hf_api import CommitOperationCopy # noqa: F401
1107
- from .hf_api import CommitOperationDelete # noqa: F401
1108
- from .hf_api import DatasetInfo # noqa: F401
1109
- from .hf_api import GitCommitInfo # noqa: F401
1110
- from .hf_api import GitRefInfo # noqa: F401
1111
- from .hf_api import GitRefs # noqa: F401
1112
- from .hf_api import HfApi # noqa: F401
1113
- from .hf_api import ModelInfo # noqa: F401
1114
- from .hf_api import RepoUrl # noqa: F401
1115
- from .hf_api import SpaceInfo # noqa: F401
1116
- from .hf_api import User # noqa: F401
1117
- from .hf_api import UserLikes # noqa: F401
1118
- from .hf_api import WebhookInfo # noqa: F401
1119
- from .hf_api import WebhookWatchedItem # noqa: F401
1120
- from .hf_api import accept_access_request # noqa: F401
1121
- from .hf_api import add_collection_item # noqa: F401
1122
- from .hf_api import add_space_secret # noqa: F401
1123
- from .hf_api import add_space_variable # noqa: F401
1124
- from .hf_api import auth_check # noqa: F401
1125
- from .hf_api import cancel_access_request # noqa: F401
1126
- from .hf_api import change_discussion_status # noqa: F401
1127
- from .hf_api import comment_discussion # noqa: F401
1128
- from .hf_api import create_branch # noqa: F401
1129
- from .hf_api import create_collection # noqa: F401
1130
- from .hf_api import create_commit # noqa: F401
1131
- from .hf_api import create_discussion # noqa: F401
1132
- from .hf_api import create_inference_endpoint # noqa: F401
1133
- from .hf_api import create_inference_endpoint_from_catalog # noqa: F401
1134
- from .hf_api import create_pull_request # noqa: F401
1135
- from .hf_api import create_repo # noqa: F401
1136
- from .hf_api import create_tag # noqa: F401
1137
- from .hf_api import create_webhook # noqa: F401
1138
- from .hf_api import dataset_info # noqa: F401
1139
- from .hf_api import delete_branch # noqa: F401
1140
- from .hf_api import delete_collection # noqa: F401
1141
- from .hf_api import delete_collection_item # noqa: F401
1142
- from .hf_api import delete_file # noqa: F401
1143
- from .hf_api import delete_folder # noqa: F401
1144
- from .hf_api import delete_inference_endpoint # noqa: F401
1145
- from .hf_api import delete_repo # noqa: F401
1146
- from .hf_api import delete_space_secret # noqa: F401
1147
- from .hf_api import delete_space_storage # noqa: F401
1148
- from .hf_api import delete_space_variable # noqa: F401
1149
- from .hf_api import delete_tag # noqa: F401
1150
- from .hf_api import delete_webhook # noqa: F401
1151
- from .hf_api import disable_webhook # noqa: F401
1152
- from .hf_api import duplicate_space # noqa: F401
1153
- from .hf_api import edit_discussion_comment # noqa: F401
1154
- from .hf_api import enable_webhook # noqa: F401
1155
- from .hf_api import file_exists # noqa: F401
1156
- from .hf_api import get_collection # noqa: F401
1157
- from .hf_api import get_dataset_tags # noqa: F401
1158
- from .hf_api import get_discussion_details # noqa: F401
1159
- from .hf_api import get_full_repo_name # noqa: F401
1160
- from .hf_api import get_inference_endpoint # noqa: F401
1161
- from .hf_api import get_model_tags # noqa: F401
1162
- from .hf_api import get_paths_info # noqa: F401
1163
- from .hf_api import get_repo_discussions # noqa: F401
1164
- from .hf_api import get_safetensors_metadata # noqa: F401
1165
- from .hf_api import get_space_runtime # noqa: F401
1166
- from .hf_api import get_space_variables # noqa: F401
1167
- from .hf_api import get_token_permission # noqa: F401
1168
- from .hf_api import get_user_overview # noqa: F401
1169
- from .hf_api import get_webhook # noqa: F401
1170
- from .hf_api import grant_access # noqa: F401
1171
- from .hf_api import list_accepted_access_requests # noqa: F401
1172
- from .hf_api import list_collections # noqa: F401
1173
- from .hf_api import list_datasets # noqa: F401
1174
- from .hf_api import list_inference_catalog # noqa: F401
1175
- from .hf_api import list_inference_endpoints # noqa: F401
1176
- from .hf_api import list_lfs_files # noqa: F401
1177
- from .hf_api import list_liked_repos # noqa: F401
1178
- from .hf_api import list_models # noqa: F401
1179
- from .hf_api import list_organization_members # noqa: F401
1180
- from .hf_api import list_papers # noqa: F401
1181
- from .hf_api import list_pending_access_requests # noqa: F401
1182
- from .hf_api import list_rejected_access_requests # noqa: F401
1183
- from .hf_api import list_repo_commits # noqa: F401
1184
- from .hf_api import list_repo_files # noqa: F401
1185
- from .hf_api import list_repo_likers # noqa: F401
1186
- from .hf_api import list_repo_refs # noqa: F401
1187
- from .hf_api import list_repo_tree # noqa: F401
1188
- from .hf_api import list_spaces # noqa: F401
1189
- from .hf_api import list_user_followers # noqa: F401
1190
- from .hf_api import list_user_following # noqa: F401
1191
- from .hf_api import list_webhooks # noqa: F401
1192
- from .hf_api import merge_pull_request # noqa: F401
1193
- from .hf_api import model_info # noqa: F401
1194
- from .hf_api import move_repo # noqa: F401
1195
- from .hf_api import paper_info # noqa: F401
1196
- from .hf_api import parse_safetensors_file_metadata # noqa: F401
1197
- from .hf_api import pause_inference_endpoint # noqa: F401
1198
- from .hf_api import pause_space # noqa: F401
1199
- from .hf_api import permanently_delete_lfs_files # noqa: F401
1200
- from .hf_api import preupload_lfs_files # noqa: F401
1201
- from .hf_api import reject_access_request # noqa: F401
1202
- from .hf_api import rename_discussion # noqa: F401
1203
- from .hf_api import repo_exists # noqa: F401
1204
- from .hf_api import repo_info # noqa: F401
1205
- from .hf_api import repo_type_and_id_from_hf_id # noqa: F401
1206
- from .hf_api import request_space_hardware # noqa: F401
1207
- from .hf_api import request_space_storage # noqa: F401
1208
- from .hf_api import restart_space # noqa: F401
1209
- from .hf_api import resume_inference_endpoint # noqa: F401
1210
- from .hf_api import revision_exists # noqa: F401
1211
- from .hf_api import run_as_future # noqa: F401
1212
- from .hf_api import scale_to_zero_inference_endpoint # noqa: F401
1213
- from .hf_api import set_space_sleep_time # noqa: F401
1214
- from .hf_api import space_info # noqa: F401
1215
- from .hf_api import super_squash_history # noqa: F401
1216
- from .hf_api import unlike # noqa: F401
1217
- from .hf_api import update_collection_item # noqa: F401
1218
- from .hf_api import update_collection_metadata # noqa: F401
1219
- from .hf_api import update_inference_endpoint # noqa: F401
1220
- from .hf_api import update_repo_settings # noqa: F401
1221
- from .hf_api import update_repo_visibility # noqa: F401
1222
- from .hf_api import update_webhook # noqa: F401
1223
- from .hf_api import upload_file # noqa: F401
1224
- from .hf_api import upload_folder # noqa: F401
1225
- from .hf_api import upload_large_folder # noqa: F401
1226
- from .hf_api import whoami # noqa: F401
1227
- from .hf_file_system import HfFileSystem # noqa: F401
1228
- from .hf_file_system import HfFileSystemFile # noqa: F401
1229
- from .hf_file_system import HfFileSystemResolvedPath # noqa: F401
1230
- from .hf_file_system import HfFileSystemStreamFile # noqa: F401
1231
- from .hub_mixin import ModelHubMixin # noqa: F401
1232
- from .hub_mixin import PyTorchModelHubMixin # noqa: F401
1233
- from .inference._client import InferenceClient # noqa: F401
1234
- from .inference._client import InferenceTimeoutError # noqa: F401
1235
- from .inference._generated._async_client import \
1236
- AsyncInferenceClient # noqa: F401
1237
- from .inference._generated.types import \
1238
- AudioClassificationInput # noqa: F401
1239
- from .inference._generated.types import \
1240
- AudioClassificationOutputElement # noqa: F401
1241
- from .inference._generated.types import \
1242
- AudioClassificationOutputTransform # noqa: F401
1243
- from .inference._generated.types import \
1244
- AudioClassificationParameters # noqa: F401
1245
- from .inference._generated.types import AudioToAudioInput # noqa: F401
1246
- from .inference._generated.types import \
1247
- AudioToAudioOutputElement # noqa: F401
1248
- from .inference._generated.types import \
1249
- AutomaticSpeechRecognitionEarlyStoppingEnum # noqa: F401
1250
- from .inference._generated.types import \
1251
- AutomaticSpeechRecognitionGenerationParameters # noqa: F401
1252
- from .inference._generated.types import \
1253
- AutomaticSpeechRecognitionInput # noqa: F401
1254
- from .inference._generated.types import \
1255
- AutomaticSpeechRecognitionOutput # noqa: F401
1256
- from .inference._generated.types import \
1257
- AutomaticSpeechRecognitionOutputChunk # noqa: F401
1258
- from .inference._generated.types import \
1259
- AutomaticSpeechRecognitionParameters # noqa: F401
1260
- from .inference._generated.types import ChatCompletionInput # noqa: F401
1261
- from .inference._generated.types import \
1262
- ChatCompletionInputFunctionDefinition # noqa: F401
1263
- from .inference._generated.types import \
1264
- ChatCompletionInputFunctionName # noqa: F401
1265
- from .inference._generated.types import \
1266
- ChatCompletionInputGrammarType # noqa: F401
1267
- from .inference._generated.types import \
1268
- ChatCompletionInputJSONSchema # noqa: F401
1269
- from .inference._generated.types import \
1270
- ChatCompletionInputMessage # noqa: F401
1271
- from .inference._generated.types import \
1272
- ChatCompletionInputMessageChunk # noqa: F401
1273
- from .inference._generated.types import \
1274
- ChatCompletionInputMessageChunkType # noqa: F401
1275
- from .inference._generated.types import \
1276
- ChatCompletionInputResponseFormatJSONObject # noqa: F401
1277
- from .inference._generated.types import \
1278
- ChatCompletionInputResponseFormatJSONSchema # noqa: F401
1279
- from .inference._generated.types import \
1280
- ChatCompletionInputResponseFormatText # noqa: F401
1281
- from .inference._generated.types import \
1282
- ChatCompletionInputStreamOptions # noqa: F401
1283
- from .inference._generated.types import \
1284
- ChatCompletionInputTool # noqa: F401
1285
- from .inference._generated.types import \
1286
- ChatCompletionInputToolCall # noqa: F401
1287
- from .inference._generated.types import \
1288
- ChatCompletionInputToolChoiceClass # noqa: F401
1289
- from .inference._generated.types import \
1290
- ChatCompletionInputToolChoiceEnum # noqa: F401
1291
- from .inference._generated.types import \
1292
- ChatCompletionInputURL # noqa: F401
1293
- from .inference._generated.types import ChatCompletionOutput # noqa: F401
1294
- from .inference._generated.types import \
1295
- ChatCompletionOutputComplete # noqa: F401
1296
- from .inference._generated.types import \
1297
- ChatCompletionOutputFunctionDefinition # noqa: F401
1298
- from .inference._generated.types import \
1299
- ChatCompletionOutputLogprob # noqa: F401
1300
- from .inference._generated.types import \
1301
- ChatCompletionOutputLogprobs # noqa: F401
1302
- from .inference._generated.types import \
1303
- ChatCompletionOutputMessage # noqa: F401
1304
- from .inference._generated.types import \
1305
- ChatCompletionOutputToolCall # noqa: F401
1306
- from .inference._generated.types import \
1307
- ChatCompletionOutputTopLogprob # noqa: F401
1308
- from .inference._generated.types import \
1309
- ChatCompletionOutputUsage # noqa: F401
1310
- from .inference._generated.types import \
1311
- ChatCompletionStreamOutput # noqa: F401
1312
- from .inference._generated.types import \
1313
- ChatCompletionStreamOutputChoice # noqa: F401
1314
- from .inference._generated.types import \
1315
- ChatCompletionStreamOutputDelta # noqa: F401
1316
- from .inference._generated.types import \
1317
- ChatCompletionStreamOutputDeltaToolCall # noqa: F401
1318
- from .inference._generated.types import \
1319
- ChatCompletionStreamOutputFunction # noqa: F401
1320
- from .inference._generated.types import \
1321
- ChatCompletionStreamOutputLogprob # noqa: F401
1322
- from .inference._generated.types import \
1323
- ChatCompletionStreamOutputLogprobs # noqa: F401
1324
- from .inference._generated.types import \
1325
- ChatCompletionStreamOutputTopLogprob # noqa: F401
1326
- from .inference._generated.types import \
1327
- ChatCompletionStreamOutputUsage # noqa: F401
1328
- from .inference._generated.types import DepthEstimationInput # noqa: F401
1329
- from .inference._generated.types import DepthEstimationOutput # noqa: F401
1330
- from .inference._generated.types import \
1331
- DocumentQuestionAnsweringInput # noqa: F401
1332
- from .inference._generated.types import \
1333
- DocumentQuestionAnsweringInputData # noqa: F401
1334
- from .inference._generated.types import \
1335
- DocumentQuestionAnsweringOutputElement # noqa: F401
1336
- from .inference._generated.types import \
1337
- DocumentQuestionAnsweringParameters # noqa: F401
1338
- from .inference._generated.types import \
1339
- FeatureExtractionInput # noqa: F401
1340
- from .inference._generated.types import \
1341
- FeatureExtractionInputTruncationDirection # noqa: F401
1342
- from .inference._generated.types import FillMaskInput # noqa: F401
1343
- from .inference._generated.types import FillMaskOutputElement # noqa: F401
1344
- from .inference._generated.types import FillMaskParameters # noqa: F401
1345
- from .inference._generated.types import \
1346
- ImageClassificationInput # noqa: F401
1347
- from .inference._generated.types import \
1348
- ImageClassificationOutputElement # noqa: F401
1349
- from .inference._generated.types import \
1350
- ImageClassificationOutputTransform # noqa: F401
1351
- from .inference._generated.types import \
1352
- ImageClassificationParameters # noqa: F401
1353
- from .inference._generated.types import \
1354
- ImageSegmentationInput # noqa: F401
1355
- from .inference._generated.types import \
1356
- ImageSegmentationOutputElement # noqa: F401
1357
- from .inference._generated.types import \
1358
- ImageSegmentationParameters # noqa: F401
1359
- from .inference._generated.types import \
1360
- ImageSegmentationSubtask # noqa: F401
1361
- from .inference._generated.types import ImageToImageInput # noqa: F401
1362
- from .inference._generated.types import ImageToImageOutput # noqa: F401
1363
- from .inference._generated.types import \
1364
- ImageToImageParameters # noqa: F401
1365
- from .inference._generated.types import \
1366
- ImageToImageTargetSize # noqa: F401
1367
- from .inference._generated.types import \
1368
- ImageToTextEarlyStoppingEnum # noqa: F401
1369
- from .inference._generated.types import \
1370
- ImageToTextGenerationParameters # noqa: F401
1371
- from .inference._generated.types import ImageToTextInput # noqa: F401
1372
- from .inference._generated.types import ImageToTextOutput # noqa: F401
1373
- from .inference._generated.types import ImageToTextParameters # noqa: F401
1374
- from .inference._generated.types import \
1375
- ObjectDetectionBoundingBox # noqa: F401
1376
- from .inference._generated.types import ObjectDetectionInput # noqa: F401
1377
- from .inference._generated.types import \
1378
- ObjectDetectionOutputElement # noqa: F401
1379
- from .inference._generated.types import \
1380
- ObjectDetectionParameters # noqa: F401
1381
- from .inference._generated.types import Padding # noqa: F401
1382
- from .inference._generated.types import \
1383
- QuestionAnsweringInput # noqa: F401
1384
- from .inference._generated.types import \
1385
- QuestionAnsweringInputData # noqa: F401
1386
- from .inference._generated.types import \
1387
- QuestionAnsweringOutputElement # noqa: F401
1388
- from .inference._generated.types import \
1389
- QuestionAnsweringParameters # noqa: F401
1390
- from .inference._generated.types import \
1391
- SentenceSimilarityInput # noqa: F401
1392
- from .inference._generated.types import \
1393
- SentenceSimilarityInputData # noqa: F401
1394
- from .inference._generated.types import SummarizationInput # noqa: F401
1395
- from .inference._generated.types import SummarizationOutput # noqa: F401
1396
- from .inference._generated.types import \
1397
- SummarizationParameters # noqa: F401
1398
- from .inference._generated.types import \
1399
- SummarizationTruncationStrategy # noqa: F401
1400
- from .inference._generated.types import \
1401
- TableQuestionAnsweringInput # noqa: F401
1402
- from .inference._generated.types import \
1403
- TableQuestionAnsweringInputData # noqa: F401
1404
- from .inference._generated.types import \
1405
- TableQuestionAnsweringOutputElement # noqa: F401
1406
- from .inference._generated.types import \
1407
- TableQuestionAnsweringParameters # noqa: F401
1408
- from .inference._generated.types import \
1409
- Text2TextGenerationInput # noqa: F401
1410
- from .inference._generated.types import \
1411
- Text2TextGenerationOutput # noqa: F401
1412
- from .inference._generated.types import \
1413
- Text2TextGenerationParameters # noqa: F401
1414
- from .inference._generated.types import \
1415
- Text2TextGenerationTruncationStrategy # noqa: F401
1416
- from .inference._generated.types import \
1417
- TextClassificationInput # noqa: F401
1418
- from .inference._generated.types import \
1419
- TextClassificationOutputElement # noqa: F401
1420
- from .inference._generated.types import \
1421
- TextClassificationOutputTransform # noqa: F401
1422
- from .inference._generated.types import \
1423
- TextClassificationParameters # noqa: F401
1424
- from .inference._generated.types import TextGenerationInput # noqa: F401
1425
- from .inference._generated.types import \
1426
- TextGenerationInputGenerateParameters # noqa: F401
1427
- from .inference._generated.types import \
1428
- TextGenerationInputGrammarType # noqa: F401
1429
- from .inference._generated.types import TextGenerationOutput # noqa: F401
1430
- from .inference._generated.types import \
1431
- TextGenerationOutputBestOfSequence # noqa: F401
1432
- from .inference._generated.types import \
1433
- TextGenerationOutputDetails # noqa: F401
1434
- from .inference._generated.types import \
1435
- TextGenerationOutputFinishReason # noqa: F401
1436
- from .inference._generated.types import \
1437
- TextGenerationOutputPrefillToken # noqa: F401
1438
- from .inference._generated.types import \
1439
- TextGenerationOutputToken # noqa: F401
1440
- from .inference._generated.types import \
1441
- TextGenerationStreamOutput # noqa: F401
1442
- from .inference._generated.types import \
1443
- TextGenerationStreamOutputStreamDetails # noqa: F401
1444
- from .inference._generated.types import \
1445
- TextGenerationStreamOutputToken # noqa: F401
1446
- from .inference._generated.types import \
1447
- TextToAudioEarlyStoppingEnum # noqa: F401
1448
- from .inference._generated.types import \
1449
- TextToAudioGenerationParameters # noqa: F401
1450
- from .inference._generated.types import TextToAudioInput # noqa: F401
1451
- from .inference._generated.types import TextToAudioOutput # noqa: F401
1452
- from .inference._generated.types import TextToAudioParameters # noqa: F401
1453
- from .inference._generated.types import TextToImageInput # noqa: F401
1454
- from .inference._generated.types import TextToImageOutput # noqa: F401
1455
- from .inference._generated.types import TextToImageParameters # noqa: F401
1456
- from .inference._generated.types import \
1457
- TextToSpeechEarlyStoppingEnum # noqa: F401
1458
- from .inference._generated.types import \
1459
- TextToSpeechGenerationParameters # noqa: F401
1460
- from .inference._generated.types import TextToSpeechInput # noqa: F401
1461
- from .inference._generated.types import TextToSpeechOutput # noqa: F401
1462
- from .inference._generated.types import \
1463
- TextToSpeechParameters # noqa: F401
1464
- from .inference._generated.types import TextToVideoInput # noqa: F401
1465
- from .inference._generated.types import TextToVideoOutput # noqa: F401
1466
- from .inference._generated.types import TextToVideoParameters # noqa: F401
1467
- from .inference._generated.types import \
1468
- TokenClassificationAggregationStrategy # noqa: F401
1469
- from .inference._generated.types import \
1470
- TokenClassificationInput # noqa: F401
1471
- from .inference._generated.types import \
1472
- TokenClassificationOutputElement # noqa: F401
1473
- from .inference._generated.types import \
1474
- TokenClassificationParameters # noqa: F401
1475
- from .inference._generated.types import TranslationInput # noqa: F401
1476
- from .inference._generated.types import TranslationOutput # noqa: F401
1477
- from .inference._generated.types import TranslationParameters # noqa: F401
1478
- from .inference._generated.types import \
1479
- TranslationTruncationStrategy # noqa: F401
1480
- from .inference._generated.types import TypeEnum # noqa: F401
1481
- from .inference._generated.types import \
1482
- VideoClassificationInput # noqa: F401
1483
- from .inference._generated.types import \
1484
- VideoClassificationOutputElement # noqa: F401
1485
- from .inference._generated.types import \
1486
- VideoClassificationOutputTransform # noqa: F401
1487
- from .inference._generated.types import \
1488
- VideoClassificationParameters # noqa: F401
1489
- from .inference._generated.types import \
1490
- VisualQuestionAnsweringInput # noqa: F401
1491
- from .inference._generated.types import \
1492
- VisualQuestionAnsweringInputData # noqa: F401
1493
- from .inference._generated.types import \
1494
- VisualQuestionAnsweringOutputElement # noqa: F401
1495
- from .inference._generated.types import \
1496
- VisualQuestionAnsweringParameters # noqa: F401
1497
- from .inference._generated.types import \
1498
- ZeroShotClassificationInput # noqa: F401
1499
- from .inference._generated.types import \
1500
- ZeroShotClassificationOutputElement # noqa: F401
1501
- from .inference._generated.types import \
1502
- ZeroShotClassificationParameters # noqa: F401
1503
- from .inference._generated.types import \
1504
- ZeroShotImageClassificationInput # noqa: F401
1505
- from .inference._generated.types import \
1506
- ZeroShotImageClassificationOutputElement # noqa: F401
1507
- from .inference._generated.types import \
1508
- ZeroShotImageClassificationParameters # noqa: F401
1509
- from .inference._generated.types import \
1510
- ZeroShotObjectDetectionBoundingBox # noqa: F401
1511
- from .inference._generated.types import \
1512
- ZeroShotObjectDetectionInput # noqa: F401
1513
- from .inference._generated.types import \
1514
- ZeroShotObjectDetectionOutputElement # noqa: F401
1515
- from .inference._generated.types import \
1516
- ZeroShotObjectDetectionParameters # noqa: F401
1107
+ from ._webhooks_payload import (
1108
+ WebhookPayload, # noqa: F401
1109
+ WebhookPayloadComment, # noqa: F401
1110
+ WebhookPayloadDiscussion, # noqa: F401
1111
+ WebhookPayloadDiscussionChanges, # noqa: F401
1112
+ WebhookPayloadEvent, # noqa: F401
1113
+ WebhookPayloadMovedTo, # noqa: F401
1114
+ WebhookPayloadRepo, # noqa: F401
1115
+ WebhookPayloadUrl, # noqa: F401
1116
+ WebhookPayloadWebhook, # noqa: F401
1117
+ )
1118
+ from ._webhooks_server import (
1119
+ WebhooksServer, # noqa: F401
1120
+ webhook_endpoint, # noqa: F401
1121
+ )
1122
+ from .community import (
1123
+ Discussion, # noqa: F401
1124
+ DiscussionComment, # noqa: F401
1125
+ DiscussionCommit, # noqa: F401
1126
+ DiscussionEvent, # noqa: F401
1127
+ DiscussionStatusChange, # noqa: F401
1128
+ DiscussionTitleChange, # noqa: F401
1129
+ DiscussionWithDetails, # noqa: F401
1130
+ )
1131
+ from .constants import (
1132
+ CONFIG_NAME, # noqa: F401
1133
+ FLAX_WEIGHTS_NAME, # noqa: F401
1134
+ HUGGINGFACE_CO_URL_HOME, # noqa: F401
1135
+ HUGGINGFACE_CO_URL_TEMPLATE, # noqa: F401
1136
+ PYTORCH_WEIGHTS_NAME, # noqa: F401
1137
+ REPO_TYPE_DATASET, # noqa: F401
1138
+ REPO_TYPE_MODEL, # noqa: F401
1139
+ REPO_TYPE_SPACE, # noqa: F401
1140
+ TF2_WEIGHTS_NAME, # noqa: F401
1141
+ TF_WEIGHTS_NAME, # noqa: F401
1142
+ )
1143
+ from .fastai_utils import (
1144
+ _save_pretrained_fastai, # noqa: F401
1145
+ from_pretrained_fastai, # noqa: F401
1146
+ push_to_hub_fastai, # noqa: F401
1147
+ )
1148
+ from .file_download import (
1149
+ _CACHED_NO_EXIST, # noqa: F401
1150
+ HfFileMetadata, # noqa: F401
1151
+ get_hf_file_metadata, # noqa: F401
1152
+ hf_hub_download, # noqa: F401
1153
+ hf_hub_url, # noqa: F401
1154
+ try_to_load_from_cache, # noqa: F401
1155
+ )
1156
+ from .hf_api import (
1157
+ Collection, # noqa: F401
1158
+ CollectionItem, # noqa: F401
1159
+ CommitInfo, # noqa: F401
1160
+ CommitOperation, # noqa: F401
1161
+ CommitOperationAdd, # noqa: F401
1162
+ CommitOperationCopy, # noqa: F401
1163
+ CommitOperationDelete, # noqa: F401
1164
+ DatasetInfo, # noqa: F401
1165
+ GitCommitInfo, # noqa: F401
1166
+ GitRefInfo, # noqa: F401
1167
+ GitRefs, # noqa: F401
1168
+ HfApi, # noqa: F401
1169
+ ModelInfo, # noqa: F401
1170
+ RepoUrl, # noqa: F401
1171
+ SpaceInfo, # noqa: F401
1172
+ User, # noqa: F401
1173
+ UserLikes, # noqa: F401
1174
+ WebhookInfo, # noqa: F401
1175
+ WebhookWatchedItem, # noqa: F401
1176
+ accept_access_request, # noqa: F401
1177
+ add_collection_item, # noqa: F401
1178
+ add_space_secret, # noqa: F401
1179
+ add_space_variable, # noqa: F401
1180
+ auth_check, # noqa: F401
1181
+ cancel_access_request, # noqa: F401
1182
+ cancel_job, # noqa: F401
1183
+ change_discussion_status, # noqa: F401
1184
+ comment_discussion, # noqa: F401
1185
+ create_branch, # noqa: F401
1186
+ create_collection, # noqa: F401
1187
+ create_commit, # noqa: F401
1188
+ create_discussion, # noqa: F401
1189
+ create_inference_endpoint, # noqa: F401
1190
+ create_inference_endpoint_from_catalog, # noqa: F401
1191
+ create_pull_request, # noqa: F401
1192
+ create_repo, # noqa: F401
1193
+ create_tag, # noqa: F401
1194
+ create_webhook, # noqa: F401
1195
+ dataset_info, # noqa: F401
1196
+ delete_branch, # noqa: F401
1197
+ delete_collection, # noqa: F401
1198
+ delete_collection_item, # noqa: F401
1199
+ delete_file, # noqa: F401
1200
+ delete_folder, # noqa: F401
1201
+ delete_inference_endpoint, # noqa: F401
1202
+ delete_repo, # noqa: F401
1203
+ delete_space_secret, # noqa: F401
1204
+ delete_space_storage, # noqa: F401
1205
+ delete_space_variable, # noqa: F401
1206
+ delete_tag, # noqa: F401
1207
+ delete_webhook, # noqa: F401
1208
+ disable_webhook, # noqa: F401
1209
+ duplicate_space, # noqa: F401
1210
+ edit_discussion_comment, # noqa: F401
1211
+ enable_webhook, # noqa: F401
1212
+ fetch_job_logs, # noqa: F401
1213
+ file_exists, # noqa: F401
1214
+ get_collection, # noqa: F401
1215
+ get_dataset_tags, # noqa: F401
1216
+ get_discussion_details, # noqa: F401
1217
+ get_full_repo_name, # noqa: F401
1218
+ get_inference_endpoint, # noqa: F401
1219
+ get_model_tags, # noqa: F401
1220
+ get_paths_info, # noqa: F401
1221
+ get_repo_discussions, # noqa: F401
1222
+ get_safetensors_metadata, # noqa: F401
1223
+ get_space_runtime, # noqa: F401
1224
+ get_space_variables, # noqa: F401
1225
+ get_token_permission, # noqa: F401
1226
+ get_user_overview, # noqa: F401
1227
+ get_webhook, # noqa: F401
1228
+ grant_access, # noqa: F401
1229
+ inspect_job, # noqa: F401
1230
+ list_accepted_access_requests, # noqa: F401
1231
+ list_collections, # noqa: F401
1232
+ list_datasets, # noqa: F401
1233
+ list_inference_catalog, # noqa: F401
1234
+ list_inference_endpoints, # noqa: F401
1235
+ list_jobs, # noqa: F401
1236
+ list_lfs_files, # noqa: F401
1237
+ list_liked_repos, # noqa: F401
1238
+ list_models, # noqa: F401
1239
+ list_organization_members, # noqa: F401
1240
+ list_papers, # noqa: F401
1241
+ list_pending_access_requests, # noqa: F401
1242
+ list_rejected_access_requests, # noqa: F401
1243
+ list_repo_commits, # noqa: F401
1244
+ list_repo_files, # noqa: F401
1245
+ list_repo_likers, # noqa: F401
1246
+ list_repo_refs, # noqa: F401
1247
+ list_repo_tree, # noqa: F401
1248
+ list_spaces, # noqa: F401
1249
+ list_user_followers, # noqa: F401
1250
+ list_user_following, # noqa: F401
1251
+ list_webhooks, # noqa: F401
1252
+ merge_pull_request, # noqa: F401
1253
+ model_info, # noqa: F401
1254
+ move_repo, # noqa: F401
1255
+ paper_info, # noqa: F401
1256
+ parse_safetensors_file_metadata, # noqa: F401
1257
+ pause_inference_endpoint, # noqa: F401
1258
+ pause_space, # noqa: F401
1259
+ permanently_delete_lfs_files, # noqa: F401
1260
+ preupload_lfs_files, # noqa: F401
1261
+ reject_access_request, # noqa: F401
1262
+ rename_discussion, # noqa: F401
1263
+ repo_exists, # noqa: F401
1264
+ repo_info, # noqa: F401
1265
+ repo_type_and_id_from_hf_id, # noqa: F401
1266
+ request_space_hardware, # noqa: F401
1267
+ request_space_storage, # noqa: F401
1268
+ restart_space, # noqa: F401
1269
+ resume_inference_endpoint, # noqa: F401
1270
+ revision_exists, # noqa: F401
1271
+ run_as_future, # noqa: F401
1272
+ run_job, # noqa: F401
1273
+ run_uv_job, # noqa: F401
1274
+ scale_to_zero_inference_endpoint, # noqa: F401
1275
+ set_space_sleep_time, # noqa: F401
1276
+ space_info, # noqa: F401
1277
+ super_squash_history, # noqa: F401
1278
+ unlike, # noqa: F401
1279
+ update_collection_item, # noqa: F401
1280
+ update_collection_metadata, # noqa: F401
1281
+ update_inference_endpoint, # noqa: F401
1282
+ update_repo_settings, # noqa: F401
1283
+ update_repo_visibility, # noqa: F401
1284
+ update_webhook, # noqa: F401
1285
+ upload_file, # noqa: F401
1286
+ upload_folder, # noqa: F401
1287
+ upload_large_folder, # noqa: F401
1288
+ whoami, # noqa: F401
1289
+ )
1290
+ from .hf_file_system import (
1291
+ HfFileSystem, # noqa: F401
1292
+ HfFileSystemFile, # noqa: F401
1293
+ HfFileSystemResolvedPath, # noqa: F401
1294
+ HfFileSystemStreamFile, # noqa: F401
1295
+ )
1296
+ from .hub_mixin import (
1297
+ ModelHubMixin, # noqa: F401
1298
+ PyTorchModelHubMixin, # noqa: F401
1299
+ )
1300
+ from .inference._client import (
1301
+ InferenceClient, # noqa: F401
1302
+ InferenceTimeoutError, # noqa: F401
1303
+ )
1304
+ from .inference._generated._async_client import AsyncInferenceClient # noqa: F401
1305
+ from .inference._generated.types import (
1306
+ AudioClassificationInput, # noqa: F401
1307
+ AudioClassificationOutputElement, # noqa: F401
1308
+ AudioClassificationOutputTransform, # noqa: F401
1309
+ AudioClassificationParameters, # noqa: F401
1310
+ AudioToAudioInput, # noqa: F401
1311
+ AudioToAudioOutputElement, # noqa: F401
1312
+ AutomaticSpeechRecognitionEarlyStoppingEnum, # noqa: F401
1313
+ AutomaticSpeechRecognitionGenerationParameters, # noqa: F401
1314
+ AutomaticSpeechRecognitionInput, # noqa: F401
1315
+ AutomaticSpeechRecognitionOutput, # noqa: F401
1316
+ AutomaticSpeechRecognitionOutputChunk, # noqa: F401
1317
+ AutomaticSpeechRecognitionParameters, # noqa: F401
1318
+ ChatCompletionInput, # noqa: F401
1319
+ ChatCompletionInputFunctionDefinition, # noqa: F401
1320
+ ChatCompletionInputFunctionName, # noqa: F401
1321
+ ChatCompletionInputGrammarType, # noqa: F401
1322
+ ChatCompletionInputJSONSchema, # noqa: F401
1323
+ ChatCompletionInputMessage, # noqa: F401
1324
+ ChatCompletionInputMessageChunk, # noqa: F401
1325
+ ChatCompletionInputMessageChunkType, # noqa: F401
1326
+ ChatCompletionInputResponseFormatJSONObject, # noqa: F401
1327
+ ChatCompletionInputResponseFormatJSONSchema, # noqa: F401
1328
+ ChatCompletionInputResponseFormatText, # noqa: F401
1329
+ ChatCompletionInputStreamOptions, # noqa: F401
1330
+ ChatCompletionInputTool, # noqa: F401
1331
+ ChatCompletionInputToolCall, # noqa: F401
1332
+ ChatCompletionInputToolChoiceClass, # noqa: F401
1333
+ ChatCompletionInputToolChoiceEnum, # noqa: F401
1334
+ ChatCompletionInputURL, # noqa: F401
1335
+ ChatCompletionOutput, # noqa: F401
1336
+ ChatCompletionOutputComplete, # noqa: F401
1337
+ ChatCompletionOutputFunctionDefinition, # noqa: F401
1338
+ ChatCompletionOutputLogprob, # noqa: F401
1339
+ ChatCompletionOutputLogprobs, # noqa: F401
1340
+ ChatCompletionOutputMessage, # noqa: F401
1341
+ ChatCompletionOutputToolCall, # noqa: F401
1342
+ ChatCompletionOutputTopLogprob, # noqa: F401
1343
+ ChatCompletionOutputUsage, # noqa: F401
1344
+ ChatCompletionStreamOutput, # noqa: F401
1345
+ ChatCompletionStreamOutputChoice, # noqa: F401
1346
+ ChatCompletionStreamOutputDelta, # noqa: F401
1347
+ ChatCompletionStreamOutputDeltaToolCall, # noqa: F401
1348
+ ChatCompletionStreamOutputFunction, # noqa: F401
1349
+ ChatCompletionStreamOutputLogprob, # noqa: F401
1350
+ ChatCompletionStreamOutputLogprobs, # noqa: F401
1351
+ ChatCompletionStreamOutputTopLogprob, # noqa: F401
1352
+ ChatCompletionStreamOutputUsage, # noqa: F401
1353
+ DepthEstimationInput, # noqa: F401
1354
+ DepthEstimationOutput, # noqa: F401
1355
+ DocumentQuestionAnsweringInput, # noqa: F401
1356
+ DocumentQuestionAnsweringInputData, # noqa: F401
1357
+ DocumentQuestionAnsweringOutputElement, # noqa: F401
1358
+ DocumentQuestionAnsweringParameters, # noqa: F401
1359
+ FeatureExtractionInput, # noqa: F401
1360
+ FeatureExtractionInputTruncationDirection, # noqa: F401
1361
+ FillMaskInput, # noqa: F401
1362
+ FillMaskOutputElement, # noqa: F401
1363
+ FillMaskParameters, # noqa: F401
1364
+ ImageClassificationInput, # noqa: F401
1365
+ ImageClassificationOutputElement, # noqa: F401
1366
+ ImageClassificationOutputTransform, # noqa: F401
1367
+ ImageClassificationParameters, # noqa: F401
1368
+ ImageSegmentationInput, # noqa: F401
1369
+ ImageSegmentationOutputElement, # noqa: F401
1370
+ ImageSegmentationParameters, # noqa: F401
1371
+ ImageSegmentationSubtask, # noqa: F401
1372
+ ImageToImageInput, # noqa: F401
1373
+ ImageToImageOutput, # noqa: F401
1374
+ ImageToImageParameters, # noqa: F401
1375
+ ImageToImageTargetSize, # noqa: F401
1376
+ ImageToTextEarlyStoppingEnum, # noqa: F401
1377
+ ImageToTextGenerationParameters, # noqa: F401
1378
+ ImageToTextInput, # noqa: F401
1379
+ ImageToTextOutput, # noqa: F401
1380
+ ImageToTextParameters, # noqa: F401
1381
+ ImageToVideoInput, # noqa: F401
1382
+ ImageToVideoOutput, # noqa: F401
1383
+ ImageToVideoParameters, # noqa: F401
1384
+ ImageToVideoTargetSize, # noqa: F401
1385
+ ObjectDetectionBoundingBox, # noqa: F401
1386
+ ObjectDetectionInput, # noqa: F401
1387
+ ObjectDetectionOutputElement, # noqa: F401
1388
+ ObjectDetectionParameters, # noqa: F401
1389
+ Padding, # noqa: F401
1390
+ QuestionAnsweringInput, # noqa: F401
1391
+ QuestionAnsweringInputData, # noqa: F401
1392
+ QuestionAnsweringOutputElement, # noqa: F401
1393
+ QuestionAnsweringParameters, # noqa: F401
1394
+ SentenceSimilarityInput, # noqa: F401
1395
+ SentenceSimilarityInputData, # noqa: F401
1396
+ SummarizationInput, # noqa: F401
1397
+ SummarizationOutput, # noqa: F401
1398
+ SummarizationParameters, # noqa: F401
1399
+ SummarizationTruncationStrategy, # noqa: F401
1400
+ TableQuestionAnsweringInput, # noqa: F401
1401
+ TableQuestionAnsweringInputData, # noqa: F401
1402
+ TableQuestionAnsweringOutputElement, # noqa: F401
1403
+ TableQuestionAnsweringParameters, # noqa: F401
1404
+ Text2TextGenerationInput, # noqa: F401
1405
+ Text2TextGenerationOutput, # noqa: F401
1406
+ Text2TextGenerationParameters, # noqa: F401
1407
+ Text2TextGenerationTruncationStrategy, # noqa: F401
1408
+ TextClassificationInput, # noqa: F401
1409
+ TextClassificationOutputElement, # noqa: F401
1410
+ TextClassificationOutputTransform, # noqa: F401
1411
+ TextClassificationParameters, # noqa: F401
1412
+ TextGenerationInput, # noqa: F401
1413
+ TextGenerationInputGenerateParameters, # noqa: F401
1414
+ TextGenerationInputGrammarType, # noqa: F401
1415
+ TextGenerationOutput, # noqa: F401
1416
+ TextGenerationOutputBestOfSequence, # noqa: F401
1417
+ TextGenerationOutputDetails, # noqa: F401
1418
+ TextGenerationOutputFinishReason, # noqa: F401
1419
+ TextGenerationOutputPrefillToken, # noqa: F401
1420
+ TextGenerationOutputToken, # noqa: F401
1421
+ TextGenerationStreamOutput, # noqa: F401
1422
+ TextGenerationStreamOutputStreamDetails, # noqa: F401
1423
+ TextGenerationStreamOutputToken, # noqa: F401
1424
+ TextToAudioEarlyStoppingEnum, # noqa: F401
1425
+ TextToAudioGenerationParameters, # noqa: F401
1426
+ TextToAudioInput, # noqa: F401
1427
+ TextToAudioOutput, # noqa: F401
1428
+ TextToAudioParameters, # noqa: F401
1429
+ TextToImageInput, # noqa: F401
1430
+ TextToImageOutput, # noqa: F401
1431
+ TextToImageParameters, # noqa: F401
1432
+ TextToSpeechEarlyStoppingEnum, # noqa: F401
1433
+ TextToSpeechGenerationParameters, # noqa: F401
1434
+ TextToSpeechInput, # noqa: F401
1435
+ TextToSpeechOutput, # noqa: F401
1436
+ TextToSpeechParameters, # noqa: F401
1437
+ TextToVideoInput, # noqa: F401
1438
+ TextToVideoOutput, # noqa: F401
1439
+ TextToVideoParameters, # noqa: F401
1440
+ TokenClassificationAggregationStrategy, # noqa: F401
1441
+ TokenClassificationInput, # noqa: F401
1442
+ TokenClassificationOutputElement, # noqa: F401
1443
+ TokenClassificationParameters, # noqa: F401
1444
+ TranslationInput, # noqa: F401
1445
+ TranslationOutput, # noqa: F401
1446
+ TranslationParameters, # noqa: F401
1447
+ TranslationTruncationStrategy, # noqa: F401
1448
+ TypeEnum, # noqa: F401
1449
+ VideoClassificationInput, # noqa: F401
1450
+ VideoClassificationOutputElement, # noqa: F401
1451
+ VideoClassificationOutputTransform, # noqa: F401
1452
+ VideoClassificationParameters, # noqa: F401
1453
+ VisualQuestionAnsweringInput, # noqa: F401
1454
+ VisualQuestionAnsweringInputData, # noqa: F401
1455
+ VisualQuestionAnsweringOutputElement, # noqa: F401
1456
+ VisualQuestionAnsweringParameters, # noqa: F401
1457
+ ZeroShotClassificationInput, # noqa: F401
1458
+ ZeroShotClassificationOutputElement, # noqa: F401
1459
+ ZeroShotClassificationParameters, # noqa: F401
1460
+ ZeroShotImageClassificationInput, # noqa: F401
1461
+ ZeroShotImageClassificationOutputElement, # noqa: F401
1462
+ ZeroShotImageClassificationParameters, # noqa: F401
1463
+ ZeroShotObjectDetectionBoundingBox, # noqa: F401
1464
+ ZeroShotObjectDetectionInput, # noqa: F401
1465
+ ZeroShotObjectDetectionOutputElement, # noqa: F401
1466
+ ZeroShotObjectDetectionParameters, # noqa: F401
1467
+ )
1517
1468
  from .inference._mcp.agent import Agent # noqa: F401
1518
1469
  from .inference._mcp.mcp_client import MCPClient # noqa: F401
1519
1470
  from .inference_api import InferenceApi # noqa: F401
1520
- from .keras_mixin import KerasModelHubMixin # noqa: F401
1521
- from .keras_mixin import from_pretrained_keras # noqa: F401
1522
- from .keras_mixin import push_to_hub_keras # noqa: F401
1523
- from .keras_mixin import save_pretrained_keras # noqa: F401
1524
- from .repocard import DatasetCard # noqa: F401
1525
- from .repocard import ModelCard # noqa: F401
1526
- from .repocard import RepoCard # noqa: F401
1527
- from .repocard import SpaceCard # noqa: F401
1528
- from .repocard import metadata_eval_result # noqa: F401
1529
- from .repocard import metadata_load # noqa: F401
1530
- from .repocard import metadata_save # noqa: F401
1531
- from .repocard import metadata_update # noqa: F401
1532
- from .repocard_data import CardData # noqa: F401
1533
- from .repocard_data import DatasetCardData # noqa: F401
1534
- from .repocard_data import EvalResult # noqa: F401
1535
- from .repocard_data import ModelCardData # noqa: F401
1536
- from .repocard_data import SpaceCardData # noqa: F401
1471
+ from .keras_mixin import (
1472
+ KerasModelHubMixin, # noqa: F401
1473
+ from_pretrained_keras, # noqa: F401
1474
+ push_to_hub_keras, # noqa: F401
1475
+ save_pretrained_keras, # noqa: F401
1476
+ )
1477
+ from .repocard import (
1478
+ DatasetCard, # noqa: F401
1479
+ ModelCard, # noqa: F401
1480
+ RepoCard, # noqa: F401
1481
+ SpaceCard, # noqa: F401
1482
+ metadata_eval_result, # noqa: F401
1483
+ metadata_load, # noqa: F401
1484
+ metadata_save, # noqa: F401
1485
+ metadata_update, # noqa: F401
1486
+ )
1487
+ from .repocard_data import (
1488
+ CardData, # noqa: F401
1489
+ DatasetCardData, # noqa: F401
1490
+ EvalResult, # noqa: F401
1491
+ ModelCardData, # noqa: F401
1492
+ SpaceCardData, # noqa: F401
1493
+ )
1537
1494
  from .repository import Repository # noqa: F401
1538
- from .serialization import StateDictSplit # noqa: F401
1539
- from .serialization import get_tf_storage_size # noqa: F401
1540
- from .serialization import get_torch_storage_id # noqa: F401
1541
- from .serialization import get_torch_storage_size # noqa: F401
1542
- from .serialization import load_state_dict_from_file # noqa: F401
1543
- from .serialization import load_torch_model # noqa: F401
1544
- from .serialization import save_torch_model # noqa: F401
1545
- from .serialization import save_torch_state_dict # noqa: F401
1546
- from .serialization import \
1547
- split_state_dict_into_shards_factory # noqa: F401
1548
- from .serialization import split_tf_state_dict_into_shards # noqa: F401
1549
- from .serialization import split_torch_state_dict_into_shards # noqa: F401
1550
- from .serialization._dduf import DDUFEntry # noqa: F401
1551
- from .serialization._dduf import export_entries_as_dduf # noqa: F401
1552
- from .serialization._dduf import export_folder_as_dduf # noqa: F401
1553
- from .serialization._dduf import read_dduf_file # noqa: F401
1554
- from .utils import CachedFileInfo # noqa: F401
1555
- from .utils import CachedRepoInfo # noqa: F401
1556
- from .utils import CachedRevisionInfo # noqa: F401
1557
- from .utils import CacheNotFound # noqa: F401
1558
- from .utils import CorruptedCacheException # noqa: F401
1559
- from .utils import DeleteCacheStrategy # noqa: F401
1560
- from .utils import HFCacheInfo # noqa: F401
1561
- from .utils import HfFolder # noqa: F401
1562
- from .utils import cached_assets_path # noqa: F401
1563
- from .utils import configure_http_backend # noqa: F401
1564
- from .utils import dump_environment_info # noqa: F401
1565
- from .utils import get_session # noqa: F401
1566
- from .utils import get_token # noqa: F401
1567
- from .utils import logging # noqa: F401
1568
- from .utils import scan_cache_dir # noqa: F401
1495
+ from .serialization import (
1496
+ StateDictSplit, # noqa: F401
1497
+ get_tf_storage_size, # noqa: F401
1498
+ get_torch_storage_id, # noqa: F401
1499
+ get_torch_storage_size, # noqa: F401
1500
+ load_state_dict_from_file, # noqa: F401
1501
+ load_torch_model, # noqa: F401
1502
+ save_torch_model, # noqa: F401
1503
+ save_torch_state_dict, # noqa: F401
1504
+ split_state_dict_into_shards_factory, # noqa: F401
1505
+ split_tf_state_dict_into_shards, # noqa: F401
1506
+ split_torch_state_dict_into_shards, # noqa: F401
1507
+ )
1508
+ from .serialization._dduf import (
1509
+ DDUFEntry, # noqa: F401
1510
+ export_entries_as_dduf, # noqa: F401
1511
+ export_folder_as_dduf, # noqa: F401
1512
+ read_dduf_file, # noqa: F401
1513
+ )
1514
+ from .utils import (
1515
+ CachedFileInfo, # noqa: F401
1516
+ CachedRepoInfo, # noqa: F401
1517
+ CachedRevisionInfo, # noqa: F401
1518
+ CacheNotFound, # noqa: F401
1519
+ CorruptedCacheException, # noqa: F401
1520
+ DeleteCacheStrategy, # noqa: F401
1521
+ HFCacheInfo, # noqa: F401
1522
+ HfFolder, # noqa: F401
1523
+ cached_assets_path, # noqa: F401
1524
+ configure_http_backend, # noqa: F401
1525
+ dump_environment_info, # noqa: F401
1526
+ get_session, # noqa: F401
1527
+ get_token, # noqa: F401
1528
+ logging, # noqa: F401
1529
+ scan_cache_dir, # noqa: F401
1530
+ )