Created
September 23, 2019 18:03
-
-
Save mohdsanadzakirizvi/436ce87e5eb961473459d8bdcbd7eb7f to your computer and use it in GitHub Desktop.
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