PrakhAI commited on
Commit
56615fa
·
1 Parent(s): 697c26b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -38,10 +38,10 @@ if 'generate' in st.session_state:
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):
41
- with st.container():
42
- for (col_idx, col) in enumerate(st.columns(COLUMNS)):
43
- with col:
44
- idx = row*COLUMNS + col_idx
45
- st.image(Image.fromarray(img[idx]))
46
- if st.button(label="Generate similar", key="%d_%d" % (unique_id, idx)):
47
- st.session_state['generate'] = latents[idx]
 
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):
41
+ with st.container():
42
+ for (col_idx, col) in enumerate(st.columns(COLUMNS)):
43
+ with col:
44
+ idx = row*COLUMNS + col_idx
45
+ st.image(Image.fromarray(img[idx]))
46
+ if st.button(label="Generate similar", key="%d_%d" % (unique_id, idx)):
47
+ st.session_state['generate'] = latents[idx]