LeonJHKIM commited on
Commit
23eadb3
·
1 Parent(s): 90c7d8e
Files changed (2) hide show
  1. requirements.txt +2 -0
  2. app.py +3 -0
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ websocket-client
2
+ icecream
app.py CHANGED
@@ -150,6 +150,7 @@ def main():
150
 
151
  st.write(f"Your text prompt: {text_prompt}")
152
  with st.spinner('Processing... Please wait.'):
 
153
  ws = websocket.WebSocket()
154
  try:
155
  ws.connect("ws://{}/ws?clientId={}&token={}".format(server_address, client_id, TOKEN))
@@ -160,6 +161,8 @@ def main():
160
 
161
  images = get_images(ws, workflow, bg_color, text_prompt, password, images_base64)
162
  ws.close()
 
 
163
 
164
  if images:
165
  st.write("Click on an image to view in full size.")
 
150
 
151
  st.write(f"Your text prompt: {text_prompt}")
152
  with st.spinner('Processing... Please wait.'):
153
+ gif_runner = st.image("https://huggingface.co/spaces/LeonJHK/AMDsnap/blob/main/wait-waiting.gif")
154
  ws = websocket.WebSocket()
155
  try:
156
  ws.connect("ws://{}/ws?clientId={}&token={}".format(server_address, client_id, TOKEN))
 
161
 
162
  images = get_images(ws, workflow, bg_color, text_prompt, password, images_base64)
163
  ws.close()
164
+ gif_runner.empty() # Remove the GIF after processing is done
165
+
166
 
167
  if images:
168
  st.write("Click on an image to view in full size.")