CarlosMalaga
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -365,21 +365,7 @@ def run_client():
|
|
365 |
|
366 |
if candidates_text:
|
367 |
st.session_state.candidates = candidates_text[:5]
|
368 |
-
|
369 |
-
st.markdown("<h2 style='color: black;'>Possible Candidates:</h2>", unsafe_allow_html=True)
|
370 |
-
|
371 |
-
for candidate in dict_of_ents_candidates["ents"]:
|
372 |
-
checked = candidate in st.session_state.selected_candidates
|
373 |
-
if st.checkbox(candidate, key=candidate, value=checked):
|
374 |
-
if candidate not in st.session_state.selected_candidates:
|
375 |
-
st.session_state.selected_candidates.append(candidate)
|
376 |
-
else:
|
377 |
-
if candidate in st.session_state.selected_candidates:
|
378 |
-
st.session_state.selected_candidates.remove(candidate)
|
379 |
-
|
380 |
-
if st.button("Save Selected Candidates"):
|
381 |
-
if write_candidates_to_file(text, dict_of_ents_candidates["ents"], st.session_state.selected_candidates):
|
382 |
-
st.success("Selected candidates have been saved to file.")
|
383 |
else:
|
384 |
st.session_state.candidates = []
|
385 |
st.session_state.selected_candidates = []
|
|
|
365 |
|
366 |
if candidates_text:
|
367 |
st.session_state.candidates = candidates_text[:5]
|
368 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
else:
|
370 |
st.session_state.candidates = []
|
371 |
st.session_state.selected_candidates = []
|