File size: 2,223 Bytes
9a676d6 8f9be47 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
---
title: TruthLens
emoji: 🦀
colorFrom: red
colorTo: pink
sdk: gradio
sdk_version: 5.46.0
app_file: app.py
pinned: false
license: apache-2.0
short_description: 'Here’s TruthLens – Lite: a public demo that verifies claims '
---
# 🧭 TruthLens – Misinformation-Aware RAG
TruthLens is a **fact-checking AI demo** that shows how modern GenAI can be made **responsible, transparent, and safe**.
It verifies controversial claims (vaccines, climate, elections, etc.) using **retrieval-augmented generation**, checks its own answers for **faithfulness**, and applies **safety filters**.
---
## 🚀 How it works
1. **Input a claim/question**
Example: *“Did humans cause global warming?”*
2. **Retrieve sources**
The app looks at trusted sources (WHO, IPCC, election reports). You can also paste your own text.
3. **Generate grounded answer**
TruthLens writes an answer with [1], [2] style citations from those sources.
4. **Self-check**
It tests how well the answer actually matches the sources (faithfulness score).
5. **Safety filters**
- Removes personal info (PII redaction).
- Flags toxicity levels if the language is harmful.
---
## 🛠️ Tech stack
- **Gradio** (UI & deployment)
- **Transformers** (Flan-T5 generation, DeBERTa NLI, BERT NER, Toxic-BERT)
- **SentenceTransformers** (MiniLM embeddings)
- **CrossEncoder** (MS-MARCO reranker)
- **scikit-learn / pandas / numpy / matplotlib**
All models are **CPU-friendly**, so the demo runs in a free Hugging Face Space.
---
## 🌍 Why it matters
- Tackles **misinformation** around health, climate, and politics.
- Demonstrates **responsible AI practices** (grounding, self-checking, safety).
- Shows how a **Lead AI Developer** designs not just models, but **systems** ready for production.
---
## ▶️ Try it
1. Enter a claim or question.
2. (Optional) Paste your own text sources.
3. Click **Run TruthLens** → see answer, citations, faithfulness score, and safe-share version.
---
## 👔 About this project
Created by **Aso Bozorgpanah** as a portfolio demo for **Lead AI Developer** roles.
Focus: Explainability, safety, and production-readiness in Generative AI.
|