CarlosMalaga commited on
Commit
b95324c
1 Parent(s): b80d07a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -297,12 +297,9 @@ def run_client():
297
 
298
  # ReLik API call
299
  if submit:
300
- entity_linking_bool = False
301
-
302
 
303
  if analysis_type == "Entity Linking":
304
  relik_model = st.session_state["relik_model"][0]
305
- entity_linking_bool = True
306
  else:
307
  model_idx = selection_options.index(selection_list)
308
  if "Top-k" in selection_options:
@@ -315,7 +312,7 @@ def run_client():
315
  if text:
316
  st.markdown("####")
317
  with st.spinner(text="In progress"):
318
- if entity_linking_bool:
319
  response = relik_model(text)
320
 
321
  dict_of_ents, options = get_el_annotations(response=response)
@@ -343,7 +340,7 @@ def run_client():
343
 
344
  st.markdown(text, unsafe_allow_html=True)
345
  else:
346
- if "Top-k" in selection_options:
347
  response = relik_model.retrieve(text, k=100, batch_size=400, progress_bar=False)
348
 
349
  candidates_text = []
 
297
 
298
  # ReLik API call
299
  if submit:
 
 
300
 
301
  if analysis_type == "Entity Linking":
302
  relik_model = st.session_state["relik_model"][0]
 
303
  else:
304
  model_idx = selection_options.index(selection_list)
305
  if "Top-k" in selection_options:
 
312
  if text:
313
  st.markdown("####")
314
  with st.spinner(text="In progress"):
315
+ if analysis_type == "Entity Linking":
316
  response = relik_model(text)
317
 
318
  dict_of_ents, options = get_el_annotations(response=response)
 
340
 
341
  st.markdown(text, unsafe_allow_html=True)
342
  else:
343
+ if analysis_type == "Top-k DB in Taxonomy Intervention" or analysis_type == "Top-k DB in Taxonmy Outcome":
344
  response = relik_model.retrieve(text, k=100, batch_size=400, progress_bar=False)
345
 
346
  candidates_text = []