turhancan97 commited on
Commit
077e104
·
1 Parent(s): af03c71
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -55,6 +55,9 @@ def visualize_single_image(image_path):
55
 
56
  # MAE reconstruction pasted with visible patches
57
  im_paste = img * (1 - mask) + predicted_img * mask
 
 
 
58
 
59
  # # make the plt figure larger
60
  # plt.figure(figsize=(12, 4))
@@ -73,7 +76,7 @@ def visualize_single_image(image_path):
73
 
74
  # plt.tight_layout()
75
 
76
- return img[0].numpy(), im_masked[0].numpy(), predicted_img[0].numpy(), im_paste[0].numpy()
77
 
78
  inputs_image = [
79
  gr.components.Image(type="filepath", label="Input Image"),
 
55
 
56
  # MAE reconstruction pasted with visible patches
57
  im_paste = img * (1 - mask) + predicted_img * mask
58
+
59
+ # convert to numpy
60
+ img = img[0].cpu().detach().numpy()
61
 
62
  # # make the plt figure larger
63
  # plt.figure(figsize=(12, 4))
 
76
 
77
  # plt.tight_layout()
78
 
79
+ return img # , im_masked[0].numpy(), predicted_img[0].numpy(), im_paste[0].numpy()
80
 
81
  inputs_image = [
82
  gr.components.Image(type="filepath", label="Input Image"),