ProfessorLeVesseur commited on
Commit
d6d53fa
·
verified ·
1 Parent(s): ebdc4c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -127,7 +127,7 @@ def reset_callback():
127
  st.session_state["image"] = None
128
 
129
  def main():
130
- st.title("Stxtement | Image Generation")
131
 
132
  # Input field for the prompt, tied to session state
133
  st.text_input(
@@ -136,9 +136,12 @@ def main():
136
  key="prompt_input"
137
  )
138
 
139
-
140
  # Generate Image button
141
  generate_button_clicked = st.button("Generate Image")
 
 
 
 
142
  if generate_button_clicked:
143
  if st.session_state.get("prompt_input", ""):
144
  with spinner_placeholder:
@@ -147,9 +150,6 @@ def main():
147
  else:
148
  st.warning("Please enter a prompt.")
149
 
150
- # Create a placeholder for the spinner
151
- spinner_placeholder = st.empty()
152
-
153
  # Show the image if it exists in the session state
154
  if st.session_state.get("image"):
155
  st.image(st.session_state["image"], caption="Generated Image")
 
127
  st.session_state["image"] = None
128
 
129
  def main():
130
+ st.title("MiImage Creator | Image Generation")
131
 
132
  # Input field for the prompt, tied to session state
133
  st.text_input(
 
136
  key="prompt_input"
137
  )
138
 
 
139
  # Generate Image button
140
  generate_button_clicked = st.button("Generate Image")
141
+
142
+ # Create a placeholder for the spinner after the button
143
+ spinner_placeholder = st.empty()
144
+
145
  if generate_button_clicked:
146
  if st.session_state.get("prompt_input", ""):
147
  with spinner_placeholder:
 
150
  else:
151
  st.warning("Please enter a prompt.")
152
 
 
 
 
153
  # Show the image if it exists in the session state
154
  if st.session_state.get("image"):
155
  st.image(st.session_state["image"], caption="Generated Image")