peter2000 commited on
Commit
121a5b7
1 Parent(s): ef1d02b

Update appStore/keyword_search.py

Browse files
Files changed (1) hide show
  1. appStore/keyword_search.py +1 -9
appStore/keyword_search.py CHANGED
@@ -56,13 +56,12 @@ def ask_question(question):
56
  return results
57
 
58
  def app():
59
-
60
  with st.container():
61
  st.markdown("<h1 style='text-align: center; color: black;'> Keyword Search</h1>", unsafe_allow_html=True)
62
  st.write(' ')
63
  st.write(' ')
64
 
65
- with st.expander("ℹ️ - About this app", expanded=True):
66
 
67
  st.write(
68
  """
@@ -71,17 +70,12 @@ def app():
71
  )
72
 
73
  st.markdown("")
74
-
75
  st.markdown("")
76
  st.markdown("## 📌 Step One: Upload document ")
77
 
78
  with st.container():
79
-
80
  file = st.file_uploader('Upload PDF File', type=['pdf', 'docx', 'txt'])
81
-
82
  if file is not None:
83
-
84
-
85
  with tempfile.NamedTemporaryFile(mode="wb") as temp:
86
  bytes_data = file.getvalue()
87
  temp.write(bytes_data)
@@ -94,9 +88,7 @@ def app():
94
 
95
  # preprocess document
96
  #haystackDoc, dataframeDoc, textData, paraList = clean.preprocessing(docs)
97
-
98
 
99
-
100
  question = st.text_input("Please enter your question here, we will look for the answer in the document.",
101
  value="floods",)
102
 
 
56
  return results
57
 
58
  def app():
 
59
  with st.container():
60
  st.markdown("<h1 style='text-align: center; color: black;'> Keyword Search</h1>", unsafe_allow_html=True)
61
  st.write(' ')
62
  st.write(' ')
63
 
64
+ with st.expander("ℹ️ - About this app", expanded=False):
65
 
66
  st.write(
67
  """
 
70
  )
71
 
72
  st.markdown("")
 
73
  st.markdown("")
74
  st.markdown("## 📌 Step One: Upload document ")
75
 
76
  with st.container():
 
77
  file = st.file_uploader('Upload PDF File', type=['pdf', 'docx', 'txt'])
 
78
  if file is not None:
 
 
79
  with tempfile.NamedTemporaryFile(mode="wb") as temp:
80
  bytes_data = file.getvalue()
81
  temp.write(bytes_data)
 
88
 
89
  # preprocess document
90
  #haystackDoc, dataframeDoc, textData, paraList = clean.preprocessing(docs)
 
91
 
 
92
  question = st.text_input("Please enter your question here, we will look for the answer in the document.",
93
  value="floods",)
94