Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -273,19 +273,23 @@ if st.button('Submit'):
|
|
| 273 |
|
| 274 |
|
| 275 |
|
|
|
|
|
|
|
|
|
|
| 276 |
predicted_label = "Strangers" # Example predicted label for testing
|
| 277 |
|
| 278 |
if predicted_label == "Strangers":
|
| 279 |
-
# Congratulatory message
|
| 280 |
-
st.write("Congratulations, you are selected for
|
| 281 |
|
| 282 |
# Provide the website link
|
| 283 |
-
website_link = "https://www.
|
| 284 |
|
| 285 |
# Create a button to open the link
|
| 286 |
-
if st.button('Open Interview Link'):
|
| 287 |
-
|
| 288 |
st.markdown(f'<a href="{website_link}" target="_blank">Click here if the page does not open automatically</a>', unsafe_allow_html=True)
|
| 289 |
else:
|
| 290 |
-
|
| 291 |
-
|
|
|
|
|
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
+
#import streamlit as st
|
| 277 |
+
from streamlit_js_eval import streamlit_js_eval
|
| 278 |
+
|
| 279 |
predicted_label = "Strangers" # Example predicted label for testing
|
| 280 |
|
| 281 |
if predicted_label == "Strangers":
|
| 282 |
+
# Congratulatory message for survey interview
|
| 283 |
+
st.write("Congratulations, you are selected for the survey interview!")
|
| 284 |
|
| 285 |
# Provide the website link
|
| 286 |
+
website_link = "https://www.bing.com/chat?form=NTPCHB"
|
| 287 |
|
| 288 |
# Create a button to open the link
|
| 289 |
+
if st.button('Open Survey Interview Link'):
|
| 290 |
+
streamlit_js_eval(js_code=f'window.open("{website_link}", "_blank");')
|
| 291 |
st.markdown(f'<a href="{website_link}" target="_blank">Click here if the page does not open automatically</a>', unsafe_allow_html=True)
|
| 292 |
else:
|
| 293 |
+
# Thank you message for participants not selected
|
| 294 |
+
st.write("Thank you for your participation. Unfortunately, you were not selected for the survey interview at this time.")
|
| 295 |
+
|