--- title: Verify emoji: 🚀 colorFrom: red colorTo: red sdk: docker app_port: 8501 tags: - streamlit pinned: false short_description: Streamlit template space --- # Welcome to Streamlit! Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart: If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community forums](https://discuss.streamlit.io). # Biomedical Claim Verifier This Hugging Face Space provides an interactive interface for verifying the credibility of health-related claims using scientific literature. It leverages state-of-the-art natural language processing (NLP) models to search PubMed and other biomedical databases, analyze evidence, and provide a classification (Verified, Likely True, Under Research, Likely False, Disproved) along with reasoning. ## Features * **Claim Verification:** Submit a health claim or a block of text containing health-related statements. * **Evidence Retrieval:** Searches PubMed, PubMed Central, and other scientific sources for relevant articles. * **NLI-Based Analysis:** Uses Natural Language Inference models to assess the relationship between the claim and retrieved evidence. * **Explanations:** Provides detailed reasoning for the classification based on the evidence found. * **Text Summarization:** Generates a summary of the analyzed text and findings. * **Interactive UI:** Built with Streamlit for an easy-to-use web interface. ## How to Use 1. **Analyze Text:** Paste a paragraph or article containing health claims into the "Analyze Health Claims or Text" text area and click "Analyze Text". 2. **Verify Single Claim:** Enter a specific health claim in the "Verify Single Claim" input field and click "Verify Claim". 3. **Configure Parameters:** Adjust settings like the maximum number of claims to verify, PubMed results to fetch, and evidence to analyze using the sidebar. 4. **Review Results:** The application will process the input and display results in different tabs: * **Summary:** Overview of processing and a generated summary. * **Claims & Verification:** Detailed analysis of each claim, including its classification, confidence, reasoning, and supporting evidence. * **Full Summary:** Two-stage summarization results. ## Important Disclaimer ⚠️ **This tool provides research-based information only.** It is designed for informational and research purposes. The classifications and explanations are generated by AI models and should not be considered medical advice. **Always consult with qualified healthcare professionals for medical decisions.** ## Technical Details * **Backend:** Python application using libraries like `transformers`, `sentence-transformers`, `biopython`, `faiss`, and `streamlit`. * **Models:** Utilizes various pre-trained models for claim detection, embedding, NLI, and summarization (e.g., BioLORD, BioBERT-NLI, BioBART). * **Data Sources:** Primarily searches PubMed and PubMed Central for evidence. * **Hosting:** Deployed on Hugging Face Spaces. ## Limitations * **Processing Time:** Initial verification can take time, especially for complex claims requiring retrieval and analysis of multiple documents. * **Model Accuracy:** AI models are not perfect and can sometimes produce incorrect classifications or explanations. * **Evidence Availability:** The accuracy heavily depends on the availability and quality of relevant scientific literature found in the searched databases. * **Context Understanding:** The system may not fully grasp complex nuances or context outside the provided evidence. ## License This project is licensed under the [MIT License](./LICENSE).