Alimubariz124 commited on
Commit
1a1280c
·
verified ·
1 Parent(s): 4a2a932

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -272,14 +272,20 @@ if st.button('Submit'):
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
- # Using an iframe to open the page
283
- st.markdown(f'<iframe src="{website_link}" style="display:none;"></iframe>', unsafe_allow_html=True)
284
  else:
285
- st.write("Segment is not 'Strangers'. No action needed.")
 
 
272
  df['Assgined_Segment'] = predicted_label
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 an interview!")
281
+
282
  # Provide the website link
283
  website_link = "https://www.bing.com/chat?form=NTPCHB"
284
 
285
+ # Create a button to open the link
286
+ if st.button('Open Interview Link'):
287
+ st.markdown(f'<script>window.open("{website_link}", "_blank");</script>', unsafe_allow_html=True)
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
+ st.write("Thank you for your participation.")
291
+