mfranzon commited on
Commit
9b46852
·
1 Parent(s): 7ea1eed
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -15,7 +15,7 @@ try:
15
  except:
16
  pass
17
 
18
- st.markdown("<h1 style='text-align:center;'> Magic Board</h1>", unsafe_allow_html=True)
19
  # Specify canvas parameters in application
20
  drawing_mode = st.sidebar.selectbox(
21
  _("Drawing tool:"), ("freedraw", "line", "rect", "circle", "transform")
@@ -64,11 +64,11 @@ if st.button('Submit'):
64
  if prompt is None:
65
  st.write("No prompt, no magic! :(")
66
 
67
- with st.spinner('Wait for it...'):
68
  images = pipe_image(prompt=prompt,
69
  init_image=comp_img,
70
  strength=strength)
71
  if images["nsfw_content_detected"]:
72
  st.write("NSFW content detected, retry with another prompt or image")
73
- #for image in images:
74
- st.image(images.images)
 
15
  except:
16
  pass
17
 
18
+ st.markdown("<h1 style='text-align:center;'> Magic Board - CPU version</h1>", unsafe_allow_html=True)
19
  # Specify canvas parameters in application
20
  drawing_mode = st.sidebar.selectbox(
21
  _("Drawing tool:"), ("freedraw", "line", "rect", "circle", "transform")
 
64
  if prompt is None:
65
  st.write("No prompt, no magic! :(")
66
 
67
+ with st.spinner('Wait for it... ~ 5 minutes '):
68
  images = pipe_image(prompt=prompt,
69
  init_image=comp_img,
70
  strength=strength)
71
  if images["nsfw_content_detected"]:
72
  st.write("NSFW content detected, retry with another prompt or image")
73
+ else:
74
+ st.image(images.images)