Spaces:
Sleeping
Sleeping
|
Download README.md from nancyattri/TruthCheck: direct link, hf CLI and curl.
- Browser
- Download file 2.71 kB
-
https://huggingface.co/spaces/nancyattri/TruthCheck/resolve/main/README.md
- Command line
-
hf download hf://spaces/nancyattri/TruthCheck/README.md
-
curl -L -o README.md https://huggingface.co/spaces/nancyattri/TruthCheck/resolve/main/README.md
2.71 kB
| title: TruthCheck | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: docker | |
| app_file: app.py | |
| pinned: false | |
| # π΅οΈββοΈ TruthCheck β AI-Powered Fake News Detector | |
| TruthCheck is an end-to-end Machine Learning web application designed to counter misinformation and verify the credibility of news claims. Users can input any news headline or statement, and the application cross-references it with real-time web search insights using NLP models to grade its authenticity. | |
| --- | |
| ## π Live Demo | |
| You can try out the live web application here: | |
| π [TruthCheck Live Space](https://huggingface.co/spaces/nancyattri/TruthCheck) | |
| ## π» GitHub Repository | |
| Access the source code here: | |
| π [GitHub Repository](https://github.com/Nancy-Attri/TruthCheck) | |
| --- | |
| ## π οΈ Key Features | |
| * **Real-Time Fact-Checking:** Integrates with Google Search results to fetch the most recent news articles and official statements related to the user's query. | |
| * **Semantic Similarity Scoring:** Uses state-of-the-art NLP transformers to check how closely the web search results match or contradict the user's input claim. | |
| * **Confidence Grading:** Provides a calculated truth score/percentage to help users quickly assess if the news is Verified, Misleading, or Unverified. | |
| * **Clean & Intuitive UI:** Built with HTML/CSS and Flask templates for a smooth user experience. | |
| --- | |
| ## π§° Tech Stack & Architecture | |
| * **Backend Framework:** Python, Flask | |
| * **AI/NLP Models:** * `Sentence-Transformers` (CrossEncoder / Embeddings) for semantic similarity scoring. | |
| * `Transformers` (T5-Tokenizer & Models) for textual analysis. | |
| * **External APIs:** SerpAPI (Google Search Engine Engine) | |
| * **Deployment & DevOps:** Docker, Hugging Face Spaces Secrets, Git for Version Control | |
| --- | |
| ## βοΈ How It Works (Under the Hood) | |
| 1. **User Input:** The user submits a claim or news headline through the web interface. | |
| 2. **Web Scraping & API Search:** The system uses **SerpAPI** to query Google Search and pulls the top 5 relevant news sources/articles. | |
| 3. **Semantic Processing:** The application processes the text of these articles and uses a **SentenceTransformer** model to calculate the similarity between the user's claim and the trusted news sources. | |
| 4. **Final Verdict:** Based on the similarity score threshold, the app displays whether the claim is backed by credible sources or if it lacks evidence. | |
| --- | |
| ## π Security Practices Followed | |
| * **Environment Separation:** Sensitive credentials like `SERPAPI_KEY` are strictly managed via a local `.env` file (hidden using `.gitignore`) and securely stored within Hugging Face Cloud Secrets. Hardcoded keys have been completely eliminated to maintain repository safety. |