This commit is contained in:
zjt 2023-12-18 10:05:33 +08:00
parent de39a53ee0
commit 2aca3657ad

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 = "sam_vit_h_4b8939.pth"
checkpoint = "notebooks/sam_vit_h_4b8939.pth"
model_type = "vit_h"
sam = sam_model_registry[model_type](checkpoint=checkpoint)
sam.to(device='cuda')
@ -54,6 +54,9 @@ def index():
return response
else:
return 'Content-Type not supported!'
print('server starts working')
print('server starts working')
app.run('0.0.0.0', 2020, False)