This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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