code: def load_embeddings_model(embeddings_model_name, use_gpu=False):
      """Load embeddings model from Hugging Face Hub"""
      try:
          model_kwargs = dict(device="cuda" if use_gpu else "cpu")
          embedding_model = HuggingFaceEmbeddings(
              model_name=embeddings_model_name,
              model_kwargs=model_kwargs,
          )
      except ValueError:
          raise ValueError(
              f"The {embeddings_model_name}  is not supported, please select a valid option from Hugging Face Hub!"
          )
      return embedding_model
  
imports: import json
  from dataclasses import dataclass
  from functools import lru_cache, partial
  from typing import Any, Dict, List, Union
  import html2text
  import openai
  import pandas
  import requests
  import writer
  from langchain import Writer
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
  from langchain.docstore.document import Document
  from langchain.document_loaders import DataFrameLoader
  from langchain.embeddings.base import Embeddings
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
  from langchain.vectorstores import FAISS, Chroma, VectorStore
  from pydantic import BaseModel, Extra, Field, validator
  from mindsdb.integrations.handlers.chromadb_handler.chromadb_handler import get_chromadb
  from mindsdb.integrations.handlers.rag_handler.exceptions import InvalidOpenAIModel, InvalidPromptTemplate, InvalidWriterModel, UnsupportedLLM, UnsupportedVectorStore
label_desc: Use image node_id 7 for calling a global function with example usage: load_embeddings_model(embeddings_model_name, use_gpu) and returns: embedding_model