Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -270,3 +270,17 @@ if st.button('Submit'):
|
|
270 |
|
271 |
# Add prediction to the DataFrame
|
272 |
df['Assgined_Segment'] = predicted_label
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
|
271 |
# Add prediction to the DataFrame
|
272 |
df['Assgined_Segment'] = predicted_label
|
273 |
+
|
274 |
+
|
275 |
+
predicted_label = "strangers"
|
276 |
+
|
277 |
+
# Check if the segment is "strangers"
|
278 |
+
if segment == "strangers":
|
279 |
+
# Provide the website link
|
280 |
+
website_link = "https://www.bing.com/chat?form=NTPCHB"
|
281 |
+
|
282 |
+
# Automatically open the link in a new tab
|
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.")
|