jkushwaha commited on
Commit
8dbdef3
·
verified ·
1 Parent(s): 44c8641

Update tmp.py

Browse files
Files changed (1) hide show
  1. tmp.py +6 -12
tmp.py CHANGED
@@ -1,12 +1,6 @@
1
- from glob import glob
2
- import pandas as pd
3
- path_list = glob('path/input/*')
4
- for path in path_list:
5
- data_name = path.split('/')[-1]
6
- parq_files_list = glob(f'{path}/*.parquet')
7
- df_list = []
8
- for parq_path in parq_files_list:
9
- df = pd.read_parquet(parq_path)
10
- df_list.append(df)
11
- data_df = pd.concat(df_list)
12
- data_df.to_csv(f'path to csv/{data_name}.csv')
 
1
+ def find_missing_elements(nlp_pred, segment_llm_response):
2
+ missing_elements = [item for item in nlp_pred if item not in segment_llm_response]
3
+ if missing_elements:
4
+ return f"The following elements are missing: {missing_elements}"
5
+ else:
6
+ return "All elements from nlp_pred are found in segment_llm_response."