Huggingface.js documentation
🤗 Hugging Face Space Başlığı
@huggingface/inference
Inference Client KullanAPI referansı
Sınıflar
HfInferenceInferenceClientInferenceClientEndpointInferenceClientErrorInferenceClientHubApiErrorInferenceClientInputErrorInferenceClientProviderApiErrorInferenceClientProviderOutputErrorInferenceClientRoutingError
Arayüzler
AudioToAudioOutputAudioToAudioOutputElemBaseArgsBodyParamsHeaderParamsInferenceProviderMappingEntryLoggerSeçeneklerTextGenerationInputTextGenerationOutputTextGenerationStreamBestOfSequenceTextGenerationStreamDetailsTextGenerationStreamOutputTextGenerationStreamPrefillTokenTextGenerationStreamTokenUrlParams
Modüller
@huggingface/hub
Hub ile etkileşime girinAPI Referansı
Sınıflar
Arayüzler
AuthInfoCachedFileInfoCachedRepoInfoCachedRevisionInfoCommitCopyFileCommitDataCommitDeletedEntryCommitEditFileCommitEditFileParamsCommitFileCommitInfoCommitOutputCopyDestinationCopyFilesEntryCopyProgressEventCopySourceKimlik BilgileriDatasetEntryFileDownloadInfoOutputHFCacheInfoJobVolumeLfsPathInfoListFileEntryMlxQuantizationConfigModelConfigModelDerivedFieldsModelEntryOAuthResultParallelDownloadOptionsPathInfoQuantizationConfigRangeEditCacheEntryRepoIdSafetensorsIndexJsonSafetensorsShardFileInfoSecurityFileStatusSpaceEntrySpaceResourceConfigSpaceResourceRequirementSpaceRuntimeTensorInfoUserInfoWhoAmIAppWhoAmIOrgWhoAmIUserXetFileInfoXetReadToken
@huggingface/mcp-client
@huggingface/tiny-agents
@huggingface/space-header
@huggingface/gguf
@huggingface/lerobot
@huggingface/usd-web-viewer
🤗 Hugging Face Space Başlığı
Space mini_header özelliği için Typescript destekli bir sarmalayıcı.
![]()
Yükle
pnpm add @huggingface/space-header npm add @huggingface/space-header yarn add @huggingface/space-header
Deno
// esm.sh
import { init } from "https://esm.sh/@huggingface/space-header"
// or npm:
import { init } from "npm:@huggingface/space-header"Başlat
import { init } from "@huggingface/space-header";
// ...
init(":user/:spaceId");
// init("enzostvs/lora-studio") for example❗Önemli not: init metodu istemci tarafında çağrılmalıdır.
Kullanım
Başka bir DOM öğesine target seçeneğini kullanarak space-header'ı enjekte eder
const app = document.getElementById("app");
// ...
init(":user/:spaceId", {
target: app
});Eğer alan verilerine zaten sahipseniz, bir getirme işleminden kaçınmak için bunları bir parametre olarak da iletebilirsiniz
init(space);
// space = {
// id: string;
// likes: number;
// author: string;
// }