brunorosilva commited on
Commit
5a5ec26
1 Parent(s): de07734

feat: add label to predicted img

Browse files
Files changed (1) hide show
  1. img2art_search/models/predict.py +1 -1
img2art_search/models/predict.py CHANGED
@@ -25,6 +25,6 @@ def predict(img: Image):
25
  results = []
26
  for idx, _ in zip(indices[0], distances[0]):
27
  inv_tensor = inverse_transform_img(wikiart_dataset[idx][1]).cpu().numpy()
28
- results.append(inv_tensor)
29
  os.remove(tmp_img_path)
30
  return results
 
25
  results = []
26
  for idx, _ in zip(indices[0], distances[0]):
27
  inv_tensor = inverse_transform_img(wikiart_dataset[idx][1]).cpu().numpy()
28
+ results.append((inv_tensor, wikiart_data[0][idx].split("/")[-1].split(".jpg")[0]))
29
  os.remove(tmp_img_path)
30
  return results