PrakhAI commited on
Commit
5316129
·
1 Parent(s): a91655a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -55,7 +55,7 @@ def sample_latent(key):
55
 
56
  if st.button('Generate Plane'):
57
  latents = sample_latent(jax.random.PRNGKey(int(1_000_000 * time.time())))
58
- g_out = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
59
- img = ((np.array(g_out)+1)*255./2.).astype(np.uint8)[0]
60
  st.image(Image.fromarray(np.repeat(img, repeats=3, axis=2)))
61
  st.write("The model's details are at https://huggingface.co/PrakhAI/AIPlane/blob/main/README.md")
 
55
 
56
  if st.button('Generate Plane'):
57
  latents = sample_latent(jax.random.PRNGKey(int(1_000_000 * time.time())))
58
+ (g_out32, g_out16, g_out8, g_out4) = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
59
+ img = ((np.array(g_out32[0])+1)*255./2.).astype(np.uint8)
60
  st.image(Image.fromarray(np.repeat(img, repeats=3, axis=2)))
61
  st.write("The model's details are at https://huggingface.co/PrakhAI/AIPlane/blob/main/README.md")