Vihang28 commited on
Commit
e221301
·
verified ·
1 Parent(s): 600b4ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -23,14 +23,15 @@ def final_result(pdf_file, search_term):
23
  if results:
24
  for page_num, text in results:
25
  # output_text += f"Found \033[1m'{search_term}'\033[0m on page {page_num}:\n{text}\n\n"
26
- output_text += f'''"{search_term}" on page {page_num}:
27
- \n{text}\n\n'''
28
  else:
29
  output_text = f"No results found for '{search_term}'."
30
  return output_text
31
 
32
  st.set_page_config(page_title="Search in PDF", layout="wide",initial_sidebar_state="expanded")
33
  st.markdown("<h3 style='text-align:center; font-size:24px;'>Search in PDF</h3>", unsafe_allow_html=True)
 
34
 
35
  col1, col2 = st.columns(spec=[0.4,0.6])
36
  # col3, col4 = st.columns(spec=[0.5,0.5])
 
23
  if results:
24
  for page_num, text in results:
25
  # output_text += f"Found \033[1m'{search_term}'\033[0m on page {page_num}:\n{text}\n\n"
26
+ output_text += f'''"{search_term}" on page {page_num}:\n
27
+ {text}\n\n'''
28
  else:
29
  output_text = f"No results found for '{search_term}'."
30
  return output_text
31
 
32
  st.set_page_config(page_title="Search in PDF", layout="wide",initial_sidebar_state="expanded")
33
  st.markdown("<h3 style='text-align:center; font-size:24px;'>Search in PDF</h3>", unsafe_allow_html=True)
34
+ st.write("---")
35
 
36
  col1, col2 = st.columns(spec=[0.4,0.6])
37
  # col3, col4 = st.columns(spec=[0.5,0.5])