Made call of model to device global in app.py file
Browse files166 unmodified lines16716816917017117217350 unmodified lines22422522622622722722822985 unmodified lines315316317319320318319320166 unmodified lines
device = get_device()model, transform = build_model_and_transforms(args)model = model.to(device)
examples = [ ["strawberry.jpg", "strawberry", {"image": "strawberry.jpg"}],50 unmodified lines@spaces.GPUdef count(image, text, prompts, state, device):
model.to(device) keywords = "" # do not handle this for now # Handle no prompt case.85 unmodified lines
@spaces.GPUdef count_main(image, text, prompts, device): model.to(device) keywords = "" # do not handle this for now # Handle no prompt case. if prompts is None:app.py+1-4