fix variable name
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def query_image(img):
|
|
29 |
with torch.no_grad():
|
30 |
#preds = model(inputs.unsqueeze(0).to(device))["logits"]
|
31 |
preds = model(**inputs)["logits"]
|
32 |
-
preds_upscale = upscale_logits(preds,
|
33 |
predict_label = torch.argmax(preds_upscale, dim=1).to(device)
|
34 |
return predict_label[0,:,:].detach().cpu().numpy()
|
35 |
|
|
|
29 |
with torch.no_grad():
|
30 |
#preds = model(inputs.unsqueeze(0).to(device))["logits"]
|
31 |
preds = model(**inputs)["logits"]
|
32 |
+
preds_upscale = upscale_logits(preds, img.shape[2])
|
33 |
predict_label = torch.argmax(preds_upscale, dim=1).to(device)
|
34 |
return predict_label[0,:,:].detach().cpu().numpy()
|
35 |
|