santhosh97 commited on
Commit
b8cb4ef
·
1 Parent(s): 04c9273

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -17,6 +17,10 @@ from streamlit_image_select import image_select
17
  if "key" not in st.session_state:
18
  st.session_state["key"] = uuid.uuid4().hex
19
 
 
 
 
 
20
  if "model_inputs" not in st.session_state:
21
  st.session_state["model_inputs"] = None
22
 
@@ -179,6 +183,10 @@ with train.form("training"):
179
  st.markdown('Please input an email!')
180
  else:
181
  result = generate_captcha()
 
 
 
 
182
  st.image(captcha_image, width=300)
183
  captcha_response = st.text_input("Enter the captcha response")
184
  if captcha_response:
 
17
  if "key" not in st.session_state:
18
  st.session_state["key"] = uuid.uuid4().hex
19
 
20
+
21
+ if "captcha" not in st.session_state:
22
+ st.session_state["captcha"] = None
23
+
24
  if "model_inputs" not in st.session_state:
25
  st.session_state["model_inputs"] = None
26
 
 
183
  st.markdown('Please input an email!')
184
  else:
185
  result = generate_captcha()
186
+ st.session_state['captcha'] = result
187
+ captcha_id = st.session_state['captcha']['uuid']
188
+ captcha_image = st.session_state['captcha']['captcha']
189
+
190
  st.image(captcha_image, width=300)
191
  captcha_response = st.text_input("Enter the captcha response")
192
  if captcha_response: