Spaces:
Sleeping
Sleeping
wzkariampuzha
commited on
Commit
•
82ecaf5
1
Parent(s):
734d022
Update epi_pipeline.py
Browse files- epi_pipeline.py +3 -3
epi_pipeline.py
CHANGED
@@ -735,7 +735,7 @@ class NER_Pipeline:
|
|
735 |
output = list(OrderedDict.fromkeys(output))
|
736 |
output_dict[entity] = output
|
737 |
|
738 |
-
if output_dict['EPI'] and
|
739 |
return output_dict
|
740 |
|
741 |
def align_predictions(self, predictions: np.ndarray, label_ids: np.ndarray) -> Tuple[List[int], List[int]]:
|
@@ -827,9 +827,9 @@ def streamlit_extraction(search_term:Union[int,str], maxResults:int, filtering:s
|
|
827 |
#Format of Output
|
828 |
ordered_labels = order_labels(epi_ner.labels)
|
829 |
if extract_diseases:
|
830 |
-
columns = ['PMID', 'ABSTRACT','
|
831 |
else:
|
832 |
-
columns = ['PMID', 'ABSTRACT','
|
833 |
|
834 |
results = pd.DataFrame(columns=columns)
|
835 |
|
|
|
735 |
output = list(OrderedDict.fromkeys(output))
|
736 |
output_dict[entity] = output
|
737 |
|
738 |
+
if output_dict['EPI'] and output_dict['STAT']:
|
739 |
return output_dict
|
740 |
|
741 |
def align_predictions(self, predictions: np.ndarray, label_ids: np.ndarray) -> Tuple[List[int], List[int]]:
|
|
|
827 |
#Format of Output
|
828 |
ordered_labels = order_labels(epi_ner.labels)
|
829 |
if extract_diseases:
|
830 |
+
columns = ['PMID', 'ABSTRACT','PROB_OF_EPI','IsEpi','IDS','DIS']+ordered_labels
|
831 |
else:
|
832 |
+
columns = ['PMID', 'ABSTRACT','PROB_OF_EPI','IsEpi']+ordered_labels
|
833 |
|
834 |
results = pd.DataFrame(columns=columns)
|
835 |
|