You are viewing main version, which requires installation from source. If you'd like
regular pip install, checkout the latest stable version (v2.4.0).
컬렉션 관리
Hub에서 Space를 관리하는 메서드에 대한 참고 자료는 HfApi 문서 페이지를 확인하세요.
- 컬렉션 콘텐츠 가져오기: get_collection()
- 새로운 컬렉션 생성: create_collection()
- 컬렉션 업데이트: update_collection_metadata()
- 컬렉션의 리소스 그룹 업데이트: update_collection_resource_group()
- 컬렉션 삭제: delete_collection()
- 컬렉션에 항목을 추가합니다: add_collection_item()
- 컬렉션의 항목을 업데이트합니다: update_collection_item()
- 컬렉션에서 항목을 제거합니다: delete_collection_item()
컬렉션
class huggingface_hub.Collection
< source >( **kwargs )
매개변수
- slug (
str) — 컬렉션의 슬러그입니다. 예:"TheBloke/recent-models-64f9a55bb3115b4f513ec026". - title (
str) — 컬렉션의 제목. 예:"Recent models". - owner (
str) — 컬렉션의 소유자. 예:"TheBloke". - items (
list[CollectionItem]) — 컬렉션의 항목 목록. - last_updated (
datetime) — 컬렉션의 마지막 업데이트 날짜. - position (
int) — 소유자의 컬렉션 목록에서 해당 컬렉션의 위치. - private (
bool) — 컬렉션이 비공개인지 여부. - theme (
str) — 컬렉션의 테마입니다. 예:"green". - upvotes (
int) — 컬렉션의 추천 수. - description (
str, 선택 사항) — 컬렉션의 설명을 일반 텍스트로 나타냅니다. - url (
str) — (property) Hub에서 컬렉션의 URL입니다.
Hub의 Collection에 대한 정보를 포함합니다.
CollectionItem
class huggingface_hub.CollectionItem
< source >( _id: strid: strtype: CollectionItemType_Tposition: intnote: dict | None = None**kwargs )
매개변수
- item_object_id (
str) — 컬렉션 내 항목의 고유 ID. - item_id (
str) — Hub의 기본 객체 ID입니다. repo_id, paper id, collection slug 또는 bucket id일 수 있습니다. 예:"jbilcke-hf/ai-comic-factory","2307.09288","celinah/cerebras-function-calling-682607169c35fbfa98b30b9a". - item_type (
str) — 기저 객체의 유형입니다."model","dataset","space","paper","collection"또는"bucket"중 하나일 수 있습니다. - position (
int) — 컬렉션에서 항목의 위치. - note (
str, 선택 사항) — 해당 항목과 연관된 노트를 일반 텍스트로 나타냅니다.
Collection(모델, 데이터셋, Space, 논문, collection 또는 bucket) 항목에 대한 정보를 포함합니다.