Update app.py
Browse files
app.py
CHANGED
|
@@ -42,5 +42,8 @@ def sample_latent(key):
|
|
| 42 |
if st.button('Generate Digit'):
|
| 43 |
latents = sample_latent(jax.random.PRNGKey(int(1_000_000 * time.time())))
|
| 44 |
g_out = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
|
|
|
|
|
|
|
|
|
|
| 45 |
img = ((np.array(g_out)+1)*255./2.).astype(np.uint8)[0]
|
| 46 |
st.image(Image.fromarray(np.repeat(img, repeats=3, axis=2)))
|
|
|
|
| 42 |
if st.button('Generate Digit'):
|
| 43 |
latents = sample_latent(jax.random.PRNGKey(int(1_000_000 * time.time())))
|
| 44 |
g_out = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
|
| 45 |
+
print(g_state['params'])
|
| 46 |
+
print(g_state['batch_stats'])
|
| 47 |
+
print(g_out)
|
| 48 |
img = ((np.array(g_out)+1)*255./2.).astype(np.uint8)[0]
|
| 49 |
st.image(Image.fromarray(np.repeat(img, repeats=3, axis=2)))
|