Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -272,15 +272,13 @@ if st.button('Submit'):
|
|
272 |
df['Assgined_Segment'] = predicted_label
|
273 |
|
274 |
|
275 |
-
#predicted_label = "strangers"
|
276 |
-
|
277 |
-
# Check if the segment is "strangers"
|
278 |
if predicted_label == "Strangers":
|
279 |
# Provide the website link
|
280 |
website_link = "https://www.bing.com/chat?form=NTPCHB"
|
281 |
-
|
282 |
-
#
|
283 |
st.write(f"Opening {website_link} in a new tab...")
|
|
|
284 |
st.markdown(f'<script>window.open("{website_link}", "_blank");</script>', unsafe_allow_html=True)
|
285 |
else:
|
286 |
st.write("Segment is not 'strangers'. No action needed.")
|
|
|
272 |
df['Assgined_Segment'] = predicted_label
|
273 |
|
274 |
|
|
|
|
|
|
|
275 |
if predicted_label == "Strangers":
|
276 |
# Provide the website link
|
277 |
website_link = "https://www.bing.com/chat?form=NTPCHB"
|
278 |
+
|
279 |
+
# Use Streamlit's functionality to write HTML and JavaScript
|
280 |
st.write(f"Opening {website_link} in a new tab...")
|
281 |
+
st.markdown(f'<a href="{website_link}" target="_blank">Click here if the page does not open automatically</a>', unsafe_allow_html=True)
|
282 |
st.markdown(f'<script>window.open("{website_link}", "_blank");</script>', unsafe_allow_html=True)
|
283 |
else:
|
284 |
st.write("Segment is not 'strangers'. No action needed.")
|