Update app.py
Browse files41 unmodified lines424344454641 unmodified linesif st.button('Generate Digit'):latents = sample_latent(jax.random.PRNGKey(int(1_000_000 * time.time())))g_out = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)img = ((np.array(g_out)+1)*255./2.).astype(np.uint8)[0]st.image(Image.fromarray(np.repeat(img, repeats=3, axis=2)))41 unmodified lines424344454647484941 unmodified linesif st.button('Generate Digit'):latents = sample_latent(jax.random.PRNGKey(int(1_000_000 * time.time())))g_out = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)print(g_state['params'])print(g_state['batch_stats'])print(g_out)img = ((np.array(g_out)+1)*255./2.).astype(np.uint8)[0]st.image(Image.fromarray(np.repeat(img, repeats=3, axis=2)))
app.py+3