Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from bert_serving.client import BertClient
# make a connection with the BERT server using it's ip address
bc = BertClient(ip="YOUR_SERVER_IP")
# get the embedding for train and val sets
X_tr_bert = bc.encode(X_tr.tolist())
X_val_bert = bc.encode(X_val.tolist())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment