huggingface-hub 0.33.1__tar.gz → 0.33.2__tar.gz
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.
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/PKG-INFO +1 -1
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/__init__.py +1 -1
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_client.py +16 -16
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_common.py +7 -2
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/agent.py +3 -2
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/cli.py +7 -14
- huggingface_hub-0.33.2/src/huggingface_hub/inference/_mcp/types.py +39 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/PKG-INFO +1 -1
- huggingface_hub-0.33.1/src/huggingface_hub/inference/_mcp/types.py +0 -65
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/LICENSE +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/MANIFEST.in +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/README.md +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/pyproject.toml +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/setup.cfg +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/setup.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_commit_api.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_commit_scheduler.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_inference_endpoints.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_local_folder.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_login.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_oauth.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_snapshot_download.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_space_api.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_tensorboard_logger.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_upload_large_folder.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_webhooks_payload.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_webhooks_server.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/_cli_utils.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/delete_cache.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/download.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/env.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/huggingface_cli.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/lfs.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/repo.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/repo_files.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/scan_cache.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/tag.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/upload.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/upload_large_folder.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/user.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/version.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/community.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/constants.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/dataclasses.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/errors.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/fastai_utils.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/file_download.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/hf_api.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/hf_file_system.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/hub_mixin.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/_async_client.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/audio_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/audio_to_audio.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/automatic_speech_recognition.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/base.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/chat_completion.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/depth_estimation.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/document_question_answering.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/feature_extraction.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/fill_mask.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/image_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/image_segmentation.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/image_to_image.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/image_to_text.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/object_detection.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/question_answering.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/sentence_similarity.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/summarization.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/table_question_answering.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text2text_generation.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text_generation.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text_to_audio.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text_to_image.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text_to_speech.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/text_to_video.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/token_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/translation.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/video_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/visual_question_answering.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/zero_shot_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/zero_shot_image_classification.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_generated/types/zero_shot_object_detection.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/_cli_hacks.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/constants.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/mcp_client.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/utils.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/_common.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/black_forest_labs.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/cerebras.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/cohere.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/fal_ai.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/featherless_ai.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/fireworks_ai.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/groq.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/hf_inference.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/hyperbolic.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/nebius.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/novita.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/nscale.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/openai.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/replicate.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/sambanova.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/together.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference_api.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/keras_mixin.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/lfs.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/py.typed +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/repocard.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/repocard_data.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/repository.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_base.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_dduf.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_tensorflow.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_torch.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/templates/datasetcard_template.md +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/templates/modelcard_template.md +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/__init__.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_auth.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_cache_assets.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_cache_manager.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_chunk_utils.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_datetime.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_deprecation.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_experimental.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_fixes.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_git_credential.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_headers.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_hf_folder.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_http.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_lfs.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_pagination.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_paths.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_runtime.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_safetensors.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_subprocess.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_telemetry.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_typing.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_validators.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_xet.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/endpoint_helpers.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/insecure_hashlib.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/logging.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/sha.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/tqdm.py +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/SOURCES.txt +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/dependency_links.txt +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/entry_points.txt +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/requires.txt +0 -0
- {huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: huggingface_hub
|
|
3
|
-
Version: 0.33.
|
|
3
|
+
Version: 0.33.2
|
|
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.
|
|
@@ -947,8 +947,8 @@ class InferenceClient:
|
|
|
947
947
|
Answer questions on document images.
|
|
948
948
|
|
|
949
949
|
Args:
|
|
950
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
951
|
-
The input image for the context. It can be raw bytes, an image file,
|
|
950
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
951
|
+
The input image for the context. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
952
952
|
question (`str`):
|
|
953
953
|
Question to be answered.
|
|
954
954
|
model (`str`, *optional*):
|
|
@@ -1156,8 +1156,8 @@ class InferenceClient:
|
|
|
1156
1156
|
Perform image classification on the given image using the specified model.
|
|
1157
1157
|
|
|
1158
1158
|
Args:
|
|
1159
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
1160
|
-
The image to classify. It can be raw bytes, an image file,
|
|
1159
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
1160
|
+
The image to classify. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
1161
1161
|
model (`str`, *optional*):
|
|
1162
1162
|
The model to use for image classification. Can be a model ID hosted on the Hugging Face Hub or a URL to a
|
|
1163
1163
|
deployed Inference Endpoint. If not provided, the default recommended model for image classification will be used.
|
|
@@ -1214,8 +1214,8 @@ class InferenceClient:
|
|
|
1214
1214
|
</Tip>
|
|
1215
1215
|
|
|
1216
1216
|
Args:
|
|
1217
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
1218
|
-
The image to segment. It can be raw bytes, an image file,
|
|
1217
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
1218
|
+
The image to segment. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
1219
1219
|
model (`str`, *optional*):
|
|
1220
1220
|
The model to use for image segmentation. Can be a model ID hosted on the Hugging Face Hub or a URL to a
|
|
1221
1221
|
deployed Inference Endpoint. If not provided, the default recommended model for image segmentation will be used.
|
|
@@ -1286,8 +1286,8 @@ class InferenceClient:
|
|
|
1286
1286
|
</Tip>
|
|
1287
1287
|
|
|
1288
1288
|
Args:
|
|
1289
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
1290
|
-
The input image for translation. It can be raw bytes, an image file,
|
|
1289
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
1290
|
+
The input image for translation. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
1291
1291
|
prompt (`str`, *optional*):
|
|
1292
1292
|
The text prompt to guide the image generation.
|
|
1293
1293
|
negative_prompt (`str`, *optional*):
|
|
@@ -1348,8 +1348,8 @@ class InferenceClient:
|
|
|
1348
1348
|
(OCR), Pix2Struct, etc). Please have a look to the model card to learn more about a model's specificities.
|
|
1349
1349
|
|
|
1350
1350
|
Args:
|
|
1351
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
1352
|
-
The input image to caption. It can be raw bytes, an image file,
|
|
1351
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
1352
|
+
The input image to caption. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
1353
1353
|
model (`str`, *optional*):
|
|
1354
1354
|
The model to use for inference. Can be a model ID hosted on the Hugging Face Hub or a URL to a deployed
|
|
1355
1355
|
Inference Endpoint. This parameter overrides the model defined at the instance level. Defaults to None.
|
|
@@ -1399,8 +1399,8 @@ class InferenceClient:
|
|
|
1399
1399
|
</Tip>
|
|
1400
1400
|
|
|
1401
1401
|
Args:
|
|
1402
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
1403
|
-
The image to detect objects on. It can be raw bytes, an image file,
|
|
1402
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
1403
|
+
The image to detect objects on. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
1404
1404
|
model (`str`, *optional*):
|
|
1405
1405
|
The model to use for object detection. Can be a model ID hosted on the Hugging Face Hub or a URL to a
|
|
1406
1406
|
deployed Inference Endpoint. If not provided, the default recommended model for object detection (DETR) will be used.
|
|
@@ -2974,8 +2974,8 @@ class InferenceClient:
|
|
|
2974
2974
|
Answering open-ended questions based on an image.
|
|
2975
2975
|
|
|
2976
2976
|
Args:
|
|
2977
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
2978
|
-
The input image for the context. It can be raw bytes, an image file,
|
|
2977
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
2978
|
+
The input image for the context. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
2979
2979
|
question (`str`):
|
|
2980
2980
|
Question to be answered.
|
|
2981
2981
|
model (`str`, *optional*):
|
|
@@ -3141,8 +3141,8 @@ class InferenceClient:
|
|
|
3141
3141
|
Provide input image and text labels to predict text labels for the image.
|
|
3142
3142
|
|
|
3143
3143
|
Args:
|
|
3144
|
-
image (`Union[str, Path, bytes, BinaryIO]`):
|
|
3145
|
-
The input image to caption. It can be raw bytes, an image file,
|
|
3144
|
+
image (`Union[str, Path, bytes, BinaryIO, PIL.Image.Image]`):
|
|
3145
|
+
The input image to caption. It can be raw bytes, an image file, a URL to an online image, or a PIL Image.
|
|
3146
3146
|
candidate_labels (`List[str]`):
|
|
3147
3147
|
The candidate labels for this image
|
|
3148
3148
|
labels (`List[str]`, *optional*):
|
|
@@ -61,7 +61,7 @@ if TYPE_CHECKING:
|
|
|
61
61
|
UrlT = str
|
|
62
62
|
PathT = Union[str, Path]
|
|
63
63
|
BinaryT = Union[bytes, BinaryIO]
|
|
64
|
-
ContentT = Union[BinaryT, PathT, UrlT]
|
|
64
|
+
ContentT = Union[BinaryT, PathT, UrlT, "Image"]
|
|
65
65
|
|
|
66
66
|
# Use to set a Accept: image/png header
|
|
67
67
|
TASKS_EXPECTING_IMAGES = {"text-to-image", "image-to-image"}
|
|
@@ -164,7 +164,6 @@ def _open_as_binary(content: Optional[ContentT]) -> Generator[Optional[BinaryT],
|
|
|
164
164
|
|
|
165
165
|
Do nothing if `content` is None,
|
|
166
166
|
|
|
167
|
-
TODO: handle a PIL.Image as input
|
|
168
167
|
TODO: handle base64 as input
|
|
169
168
|
"""
|
|
170
169
|
# If content is a string => must be either a URL or a path
|
|
@@ -185,6 +184,12 @@ def _open_as_binary(content: Optional[ContentT]) -> Generator[Optional[BinaryT],
|
|
|
185
184
|
logger.debug(f"Opening content from {content}")
|
|
186
185
|
with content.open("rb") as f:
|
|
187
186
|
yield f
|
|
187
|
+
elif hasattr(content, "save"): # PIL Image
|
|
188
|
+
logger.debug("Converting PIL Image to bytes")
|
|
189
|
+
buffer = io.BytesIO()
|
|
190
|
+
content.save(buffer, format="PNG")
|
|
191
|
+
buffer.seek(0)
|
|
192
|
+
yield buffer
|
|
188
193
|
else:
|
|
189
194
|
# Otherwise: already a file-like object or None
|
|
190
195
|
yield content
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/agent.py
RENAMED
|
@@ -7,6 +7,7 @@ from huggingface_hub import ChatCompletionInputMessage, ChatCompletionStreamOutp
|
|
|
7
7
|
|
|
8
8
|
from .._providers import PROVIDER_OR_POLICY_T
|
|
9
9
|
from .constants import DEFAULT_SYSTEM_PROMPT, EXIT_LOOP_TOOLS, MAX_NUM_TURNS
|
|
10
|
+
from .types import ServerConfig
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class Agent(MCPClient):
|
|
@@ -40,7 +41,7 @@ class Agent(MCPClient):
|
|
|
40
41
|
self,
|
|
41
42
|
*,
|
|
42
43
|
model: Optional[str] = None,
|
|
43
|
-
servers: Iterable[
|
|
44
|
+
servers: Iterable[ServerConfig],
|
|
44
45
|
provider: Optional[PROVIDER_OR_POLICY_T] = None,
|
|
45
46
|
base_url: Optional[str] = None,
|
|
46
47
|
api_key: Optional[str] = None,
|
|
@@ -54,7 +55,7 @@ class Agent(MCPClient):
|
|
|
54
55
|
|
|
55
56
|
async def load_tools(self) -> None:
|
|
56
57
|
for cfg in self._servers_cfg:
|
|
57
|
-
await self.add_mcp_server(
|
|
58
|
+
await self.add_mcp_server(**cfg)
|
|
58
59
|
|
|
59
60
|
async def run(
|
|
60
61
|
self,
|
|
@@ -85,11 +85,7 @@ async def run_agent(
|
|
|
85
85
|
input_vars = set()
|
|
86
86
|
for server in servers:
|
|
87
87
|
# Check stdio's "env" and http/sse's "headers" mappings
|
|
88
|
-
env_or_headers = (
|
|
89
|
-
server["config"].get("env", {})
|
|
90
|
-
if server["type"] == "stdio"
|
|
91
|
-
else server["config"].get("options", {}).get("requestInit", {}).get("headers", {})
|
|
92
|
-
)
|
|
88
|
+
env_or_headers = server.get("env", {}) if server["type"] == "stdio" else server.get("headers", {})
|
|
93
89
|
for key, value in env_or_headers.items():
|
|
94
90
|
if env_special_value in value:
|
|
95
91
|
input_vars.add(key)
|
|
@@ -99,8 +95,9 @@ async def run_agent(
|
|
|
99
95
|
continue
|
|
100
96
|
|
|
101
97
|
# Prompt user for input
|
|
98
|
+
env_variable_key = input_id.replace("-", "_").upper()
|
|
102
99
|
print(
|
|
103
|
-
f"[blue] • {input_id}[/blue]: {description}. (default: load from {
|
|
100
|
+
f"[blue] • {input_id}[/blue]: {description}. (default: load from {env_variable_key}).",
|
|
104
101
|
end=" ",
|
|
105
102
|
)
|
|
106
103
|
user_input = (await _async_prompt(exit_event=exit_event)).strip()
|
|
@@ -109,23 +106,19 @@ async def run_agent(
|
|
|
109
106
|
|
|
110
107
|
# Inject user input (or env variable) into stdio's env or http/sse's headers
|
|
111
108
|
for server in servers:
|
|
112
|
-
env_or_headers = (
|
|
113
|
-
server["config"].get("env", {})
|
|
114
|
-
if server["type"] == "stdio"
|
|
115
|
-
else server["config"].get("options", {}).get("requestInit", {}).get("headers", {})
|
|
116
|
-
)
|
|
109
|
+
env_or_headers = server.get("env", {}) if server["type"] == "stdio" else server.get("headers", {})
|
|
117
110
|
for key, value in env_or_headers.items():
|
|
118
111
|
if env_special_value in value:
|
|
119
112
|
if user_input:
|
|
120
113
|
env_or_headers[key] = env_or_headers[key].replace(env_special_value, user_input)
|
|
121
114
|
else:
|
|
122
|
-
value_from_env = os.getenv(
|
|
115
|
+
value_from_env = os.getenv(env_variable_key, "")
|
|
123
116
|
env_or_headers[key] = env_or_headers[key].replace(env_special_value, value_from_env)
|
|
124
117
|
if value_from_env:
|
|
125
|
-
print(f"[green]Value successfully loaded from '{
|
|
118
|
+
print(f"[green]Value successfully loaded from '{env_variable_key}'[/green]")
|
|
126
119
|
else:
|
|
127
120
|
print(
|
|
128
|
-
f"[yellow]No value found for '{
|
|
121
|
+
f"[yellow]No value found for '{env_variable_key}' in environment variables. Continuing.[/yellow]"
|
|
129
122
|
)
|
|
130
123
|
|
|
131
124
|
print()
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from typing import Dict, List, Literal, TypedDict, Union
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class InputConfig(TypedDict, total=False):
|
|
5
|
+
id: str
|
|
6
|
+
description: str
|
|
7
|
+
type: str
|
|
8
|
+
password: bool
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class StdioServerConfig(TypedDict):
|
|
12
|
+
type: Literal["stdio"]
|
|
13
|
+
command: str
|
|
14
|
+
args: List[str]
|
|
15
|
+
env: Dict[str, str]
|
|
16
|
+
cwd: str
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class HTTPServerConfig(TypedDict):
|
|
20
|
+
type: Literal["http"]
|
|
21
|
+
url: str
|
|
22
|
+
headers: Dict[str, str]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SSEServerConfig(TypedDict):
|
|
26
|
+
type: Literal["sse"]
|
|
27
|
+
url: str
|
|
28
|
+
headers: Dict[str, str]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
ServerConfig = Union[StdioServerConfig, HTTPServerConfig, SSEServerConfig]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# AgentConfig root object
|
|
35
|
+
class AgentConfig(TypedDict):
|
|
36
|
+
model: str
|
|
37
|
+
provider: str
|
|
38
|
+
inputs: List[InputConfig]
|
|
39
|
+
servers: List[ServerConfig]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: huggingface-hub
|
|
3
|
-
Version: 0.33.
|
|
3
|
+
Version: 0.33.2
|
|
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.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
from typing import Dict, List, Literal, TypedDict, Union
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
# Input config
|
|
5
|
-
class InputConfig(TypedDict, total=False):
|
|
6
|
-
id: str
|
|
7
|
-
description: str
|
|
8
|
-
type: str
|
|
9
|
-
password: bool
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
# stdio server config
|
|
13
|
-
class StdioServerConfig(TypedDict, total=False):
|
|
14
|
-
command: str
|
|
15
|
-
args: List[str]
|
|
16
|
-
env: Dict[str, str]
|
|
17
|
-
cwd: str
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class StdioServer(TypedDict):
|
|
21
|
-
type: Literal["stdio"]
|
|
22
|
-
config: StdioServerConfig
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
# http server config
|
|
26
|
-
class HTTPRequestInit(TypedDict, total=False):
|
|
27
|
-
headers: Dict[str, str]
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class HTTPServerOptions(TypedDict, total=False):
|
|
31
|
-
requestInit: HTTPRequestInit
|
|
32
|
-
sessionId: str
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class HTTPServerConfig(TypedDict, total=False):
|
|
36
|
-
url: str
|
|
37
|
-
options: HTTPServerOptions
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class HTTPServer(TypedDict):
|
|
41
|
-
type: Literal["http"]
|
|
42
|
-
config: HTTPServerConfig
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# sse server config
|
|
46
|
-
class SSEServerOptions(TypedDict, total=False):
|
|
47
|
-
requestInit: HTTPRequestInit
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class SSEServerConfig(TypedDict):
|
|
51
|
-
url: str
|
|
52
|
-
options: SSEServerOptions
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
class SSEServer(TypedDict):
|
|
56
|
-
type: Literal["sse"]
|
|
57
|
-
config: SSEServerConfig
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
# AgentConfig root object
|
|
61
|
-
class AgentConfig(TypedDict):
|
|
62
|
-
model: str
|
|
63
|
-
provider: str
|
|
64
|
-
inputs: List[InputConfig]
|
|
65
|
-
servers: List[Union[StdioServer, HTTPServer, SSEServer]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_inference_endpoints.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_tensorboard_logger.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/_upload_large_folder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/_cli_utils.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/delete_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/huggingface_cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/repo_files.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/commands/scan_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/__init__.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/_cli_hacks.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/constants.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/mcp_client.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_mcp/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/cohere.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/fal_ai.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/groq.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/nebius.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/novita.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/nscale.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/inference/_providers/openai.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/__init__.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_base.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_dduf.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_tensorflow.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/serialization/_torch.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_cache_assets.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_cache_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_experimental.py
RENAMED
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/_git_credential.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/endpoint_helpers.py
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub/utils/insecure_hashlib.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{huggingface_hub-0.33.1 → huggingface_hub-0.33.2}/src/huggingface_hub.egg-info/top_level.txt
RENAMED
|
File without changes
|