Below is the code for generating embedding and reducing dimension:
def generate_embeddings(text): if embed_fn is None: embed_fn = hub.load(module_