wzkariampuzha commited on
Commit
60a8ecf
1 Parent(s): 26498e1

Update epi_pipeline.py

Browse files
Files changed (1) hide show
  1. epi_pipeline.py +6 -1
epi_pipeline.py CHANGED
@@ -874,7 +874,12 @@ def streamlit_extraction(search_term:Union[int,str], maxResults:int, filtering:s
874
  #Export the name and GARD ID to the ap for better integration on page.
875
  name = search_term_list[-1].capitalize()
876
 
877
- return results.sort_values('PROB_OF_EPI', ascending=False), sankey_data, name
 
 
 
 
 
878
 
879
  #Identical to search_term_extraction, except it returns a JSON object instead of a df
880
  def API_extraction(search_term:Union[int,str], maxResults:int, filtering:str, #for abstract search
 
874
  #Export the name and GARD ID to the ap for better integration on page.
875
  name = search_term_list[-1].capitalize()
876
 
877
+ if search_term_list[-1] in GARD_Search.GARD_dict.keys():
878
+ disease_gardID = (name, GARD_Search.GARD_dict[search_term_list[-1]]
879
+ else:
880
+ disease_gardID = (name, None)
881
+
882
+ return results.sort_values('PROB_OF_EPI', ascending=False), sankey_data, disease_gardID
883
 
884
  #Identical to search_term_extraction, except it returns a JSON object instead of a df
885
  def API_extraction(search_term:Union[int,str], maxResults:int, filtering:str, #for abstract search