A newer version of the Gradio SDK is available:
6.2.0
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
Input a claim/question
Example: βDid humans cause global warming?βRetrieve sources
The app looks at trusted sources (WHO, IPCC, election reports). You can also paste your own text.Generate grounded answer
TruthLens writes an answer with [1], [2] style citations from those sources.Self-check
It tests how well the answer actually matches the sources (faithfulness score).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
- Enter a claim or question.
- (Optional) Paste your own text sources.
- 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.