We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33b8e0d commit bc2e455Copy full SHA for bc2e455
service/service.py
@@ -25,7 +25,7 @@ def ImgToVector(self, request, context):
25
26
def TextToVector(self, textRequest, context):
27
text_embedding = work.forward({'text': textRequest.Content})['text_embedding']
28
- print(textRequest.Content)
+ text_embedding = text_embedding.cpu() # 将张量复制到主机内存
29
numpy_array = text_embedding.numpy()
30
np.set_printoptions(suppress=True)
31
array_string = np.array2string(numpy_array, separator=',')
0 commit comments