Jai12345 commited on
Commit
8f3010c
1 Parent(s): d5cada4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -82,7 +82,7 @@ def preprocess_plain_text(text, window_size=3):
82
  text = re.sub(r"@\S+", " ", text) # mentions
83
  text = re.sub(r"#\S+", " ", text) # hastags
84
  text = re.sub(r"\s{2,}", " ", text) # over spaces
85
- # text = re.sub("[^.,!?%$A-Za-z0-9]+", " ", text) # special characters except .,!?
86
 
87
  # break into lines and remove leading and trailing space on each
88
  lines = [line.strip() for line in text.splitlines()]
@@ -217,7 +217,7 @@ def clear_search_text():
217
 
218
 
219
  url_text = st.text_input("Please Enter a url here",
220
- value="https://www.rba.gov.au/monetary-policy/rba-board-minutes/2022/2022-05-03.html",
221
  key='text_url', on_change=clear_search_text)
222
 
223
  st.markdown(
@@ -228,7 +228,7 @@ st.markdown(
228
  upload_doc = st.file_uploader("Upload a .txt, .pdf, .docx file", key="upload")
229
 
230
  search_query = st.text_input("Please Enter your search query here",
231
- value="What are the expectations for inflation for Australia?", key="text_input")
232
 
233
  if validators.url(url_text):
234
  # if input is URL
 
82
  text = re.sub(r"@\S+", " ", text) # mentions
83
  text = re.sub(r"#\S+", " ", text) # hastags
84
  text = re.sub(r"\s{2,}", " ", text) # over spaces
85
+ text = re.sub("[^.,!?%$A-Za-z0-9]+", " ", text) # special characters except .,!?
86
 
87
  # break into lines and remove leading and trailing space on each
88
  lines = [line.strip() for line in text.splitlines()]
 
217
 
218
 
219
  url_text = st.text_input("Please Enter a url here",
220
+ value="https://en.wikipedia.org/wiki/Virat_Kohli",
221
  key='text_url', on_change=clear_search_text)
222
 
223
  st.markdown(
 
228
  upload_doc = st.file_uploader("Upload a .txt, .pdf, .docx file", key="upload")
229
 
230
  search_query = st.text_input("Please Enter your search query here",
231
+ value="Who is Virat Kohli?", key="text_input")
232
 
233
  if validators.url(url_text):
234
  # if input is URL