Shabdobhedi commited on
Commit
3e33879
·
verified ·
1 Parent(s): 034d0b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -33,9 +33,10 @@ if uploaded_file is not None:
33
  # Highlight the keyword in the extracted text
34
  if keyword:
35
  highlighted_text = full_text.replace(
36
- keyword, f"<mark>{keyword}</mark>")
37
  st.subheader("Highlighted Search Results")
38
  st.markdown(highlighted_text, unsafe_allow_html=True)
39
  else:
40
  st.subheader("Highlighted Search Results")
41
  st.write("No keyword entered for highlighting.")
 
 
33
  # Highlight the keyword in the extracted text
34
  if keyword:
35
  highlighted_text = full_text.replace(
36
+ keyword, f"<mark style='background-color: yellow; color: black;'>{keyword}</mark>")
37
  st.subheader("Highlighted Search Results")
38
  st.markdown(highlighted_text, unsafe_allow_html=True)
39
  else:
40
  st.subheader("Highlighted Search Results")
41
  st.write("No keyword entered for highlighting.")
42
+