Download tmp.py from jkushwaha/rough_work: direct link, hf CLI and curl.
- Browser
- Download file 517 Bytes
-
https://huggingface.co/jkushwaha/rough_work/resolve/main/tmp.py
- Command line
-
hf download hf://jkushwaha/rough_work/tmp.py
-
curl -L -o tmp.py https://huggingface.co/jkushwaha/rough_work/resolve/main/tmp.py
517 Bytes
| def find_missing_elements(nlp_pred, segment_llm_response): | |
| missing_elements = [item for item in nlp_pred if item not in segment_llm_response] | |
| if missing_elements: | |
| return f"The following elements are missing: {missing_elements}" | |
| else: | |
| return "All elements from nlp_pred are found in segment_llm_response." | |
| [found_elements.append(value) for b_dict in segment_llm_response for key, value in b_dict.items() if 'assertion' not in key.lower() and 'date' not in key.lower() and value in nlp_pred] |