api_first_attempt / HfApi_embed_docs.R
aoiferyan's picture
Upload folder using huggingface_hub
0038e82 verified
raw
history blame contribute delete
237 Bytes
docs <- readr::read_csv("hfApi_testing.csv")
embedder <- BertopicR::bt_make_embedder_st("all-miniLM-L6-v2")
embeddings <- bt_do_embedding(embedder, docs)
embeddings %>% data.frame() %>% readr::write_csv("hfApi_testing_embeddings.csv")