| from transformers import pipeline | |
| from config import * | |
| summarizer = zero_shot = None | |
| def init_text_tools(): | |
| global summarizer, zero_shot | |
| try: | |
| summarizer = pipeline("summarization", model=HF_SUMMARIZER) | |
| except Exception as e: | |
| logger.warning("Could not load summarizer: %s", e) | |
| try: | |
| zero_shot = pipeline("zero-shot-classification", model=HF_ZERO_SHOT) | |
| except Exception as e: | |
| logger.warning("Could not load zero-shot classifier: %s", e) | |
| init_text_tools() | |
| def extract_claim_from_text(text | |