bryandts commited on
Commit
2c84baf
1 Parent(s): 8f81feb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -68,8 +68,8 @@ def generate_image(caption):
68
  noise = torch.randn(1, noise_dim, 1, 1, device=device) # Adjust noise_dim if different
69
  fake_images = generator(noise, embeddings[sampled_item].unsqueeze(0).unsqueeze(0))
70
  img = fake_images.squeeze(0).permute(1, 2, 0).cpu().detach().numpy()
71
- img = (img - img.min()) / (img.max() - img.min())
72
  img = upscale_and_sharpen_image(img)
 
73
  return img
74
 
75
  noise_dim = 16
 
68
  noise = torch.randn(1, noise_dim, 1, 1, device=device) # Adjust noise_dim if different
69
  fake_images = generator(noise, embeddings[sampled_item].unsqueeze(0).unsqueeze(0))
70
  img = fake_images.squeeze(0).permute(1, 2, 0).cpu().detach().numpy()
 
71
  img = upscale_and_sharpen_image(img)
72
+ img = (img - img.min()) / (img.max() - img.min())
73
  return img
74
 
75
  noise_dim = 16