Update app.py
Browse files
app.py
CHANGED
@@ -36,5 +36,5 @@ num_images = st.number_input(label="Number of images to generate", min_value=1,
|
|
36 |
if st.button('Generate Planes'):
|
37 |
latents = sample_latent(num_images, jax.random.PRNGKey(int(1_000_000 * time.time())))
|
38 |
(g_out128, _, _, _, _, _) = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
|
39 |
-
img = (
|
40 |
st.image(Image.fromarray(img))
|
|
|
36 |
if st.button('Generate Planes'):
|
37 |
latents = sample_latent(num_images, jax.random.PRNGKey(int(1_000_000 * time.time())))
|
38 |
(g_out128, _, _, _, _, _) = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
|
39 |
+
img = (np.array(gridify(g_out128)+1)*255./2.).astype(np.uint8)
|
40 |
st.image(Image.fromarray(img))
|