Compare commits

..

No commits in common. "1b4cec53f56156a8cd4648a37f8788806848b600" and "de39a53ee043be4b5ee70c3197456898391a48d2" have entirely different histories.

View File

@ -13,7 +13,7 @@ print(torch.cuda.is_available())
# checkpoint = "sam_vit_b_01ec64.pth"
print(time.time())
# set large model related configs
checkpoint = "notebooks/sam_vit_h_4b8939.pth"
checkpoint = "sam_vit_h_4b8939.pth"
model_type = "vit_h"
sam = sam_model_registry[model_type](checkpoint=checkpoint)
sam.to(device='cuda')
@ -51,13 +51,9 @@ def index():
np.save("array.npy", image_embedding)
response = Response(byte_io, mimetype="application/octet-stream")
response.headers["Content-Length"] = 4194432
response.headers["Access-Control-Allow-Origin"] = "*"
return response
else:
return 'Content-Type not supported!'
print('server starts working')
app.run('0.0.0.0', 2020, False)
print('server starts working')