iamviveksrk commited on
Commit
a3a87c9
β€’
1 Parent(s): b6704c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -31,14 +31,7 @@ def set_state_if_absent(key, value):
31
  if key not in st.session_state:
32
  st.session_state[key] = value
33
 
34
- queries = ['Methods of orthodontics',
35
- 'What are some effects of climate change?',
36
- 'Factors of global warming',
37
- 'Effects of Covid-19 Virus on the economy',
38
- 'Applications of AI and deep learning',
39
- 'Sexually transmitted diseases and their prevalence',
40
- 'Cryptography and cryptology']
41
-
42
  set_state_if_absent("question", choice(queries))
43
  set_state_if_absent("results", None)
44
 
@@ -87,7 +80,7 @@ def ask_question(query):
87
  return results
88
 
89
  if query:
90
- with st.spinner("πŸ‘‘    Performing semantic search on abstracts..."):
91
  try:
92
  msg = 'Asked ' + query
93
  logging.info(msg)
 
31
  if key not in st.session_state:
32
  st.session_state[key] = value
33
 
34
+ queries = joblib.load('queries.joblib')
 
 
 
 
 
 
 
35
  set_state_if_absent("question", choice(queries))
36
  set_state_if_absent("results", None)
37
 
 
80
  return results
81
 
82
  if query:
83
+ with st.spinner("🧠    Performing semantic search on abstracts..."):
84
  try:
85
  msg = 'Asked ' + query
86
  logging.info(msg)