// get encoded vectors
for j in bc.encode_async(text_gen()):
print("received %d x %d" % (j.shape[0], j.shape[0]))
After Change
if __name__ == "__main__":
bc = BertClient(ip="localhost", port=int(sys.argv[1]), port_out=int(sys.argv[2]))
t1 = threading.Thread(target=client_clone, args=(bc.identity, 1))
t2 = threading.Thread(target=client_clone, args=(bc.identity, 2))
t1.start()
t2.start()
with open("README.md") as fp:
data = [v for v in fp if v.strip()]