text: Hugging Face Hub | ğŸ¦œï¸�ğŸ”— Langchain
  
  
  
  
  
  Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAleph AlphaAzureOpenAIBedrock EmbeddingsClarifaiCohereDashScopeDeepInfraElasticsearchEmbaasFake EmbeddingsGoogle Cloud Platform Vertex AI PaLMGPT4AllHugging Face HubInstructEmbeddingsJinaLlama-cppLocalAIMiniMaxModelScopeMosaicML embeddingsNLP CloudOpenAISageMaker Endpoint EmbeddingsSelf Hosted EmbeddingsSentence Transformers EmbeddingsSpacy EmbeddingTensorflowHubAgent toolkitsToolsVector storesGrouped by providerIntegrationsText embedding modelsHugging Face HubHugging Face HubLet's load the Hugging Face Embedding class.from langchain.embeddings import HuggingFaceEmbeddingsembeddings = HuggingFaceEmbeddings()text = "This is a test document."query_result = embeddings.embed_query(text)doc_result = embeddings.embed_documents([text])PreviousGPT4AllNextInstructEmbeddingsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.