PrakhAI commited on
Commit
ff0c33b
·
1 Parent(s): 0f161cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -34,7 +34,10 @@ if 'generate' in st.session_state:
34
  latents = sample_latent(ROWS * COLUMNS, jax.random.PRNGKey(unique_id))
35
  previous = st.session_state['generate']
36
  if previous:
 
37
  latents = np.repeat([previous], repeats=16, axis=0) + 0.01 * latents
 
 
38
  (g_out128, _, _, _, _, _) = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
39
  img = np.array(to_img(g_out128))
40
  for row in range(ROWS):
 
34
  latents = sample_latent(ROWS * COLUMNS, jax.random.PRNGKey(unique_id))
35
  previous = st.session_state['generate']
36
  if previous:
37
+ print("Now generating similar")
38
  latents = np.repeat([previous], repeats=16, axis=0) + 0.01 * latents
39
+ else:
40
+ print("Now generating random")
41
  (g_out128, _, _, _, _, _) = generator.apply({'params': g_state['params'], 'batch_stats': g_state['batch_stats']}, latents, training=False)
42
  img = np.array(to_img(g_out128))
43
  for row in range(ROWS):