re-init
暂存 tmp
This commit is contained in:
19
clip_embedding/clip_embedding_test.py
Normal file
19
clip_embedding/clip_embedding_test.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from concurrent import futures
|
||||
import grpc
|
||||
import msw_pb2 as msw_pb2
|
||||
import msw_pb2_grpc as msw_pb2_grpc
|
||||
|
||||
channel = grpc.insecure_channel("127.0.0.1:8888")
|
||||
stub = msw_pb2_grpc.MSWStub(channel)
|
||||
|
||||
testImageFile = "/home/hmsy/Pictures/Screenshots/Screenshot_20240515_103419.jpeg"
|
||||
with open(testImageFile, "rb") as f:
|
||||
imageData = f.read()
|
||||
|
||||
count = 0
|
||||
while 1:
|
||||
response = stub.ClipEmbeddingForImage(
|
||||
msw_pb2.ClipEmbeddingForImageRequest(Image=imageData)
|
||||
)
|
||||
count += 1
|
||||
print(count)
|
||||
Reference in New Issue
Block a user