geninhu commited on
Commit
d653514
1 Parent(s): 15822d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -144,8 +144,10 @@ def main():
144
  unsafe_allow_html=True,)
145
 
146
  if generate_button:
147
- generator = load_generator(model_name[img_type])
148
- gan_images = generate_images(generator, number_imgs)
 
 
149
  with col12:
150
  st.image(gan_images[0], width=300)
151
  if len(gan_images) > 1:
 
144
  unsafe_allow_html=True,)
145
 
146
  if generate_button:
147
+ with st.spinner(text=f"Loading selected model..."):
148
+ generator = load_generator(model_name[img_type])
149
+ with st.spinner(text=f"Generating images..."):
150
+ gan_images = generate_images(generator, number_imgs)
151
  with col12:
152
  st.image(gan_images[0], width=300)
153
  if len(gan_images) > 1: