Skip to content

ziadalaa7/multimodal-misinformation-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multimodal Misinformation Analyzer 🔍📸

Python FastAPI Docker HuggingFace

An advanced Multimodal AI API built to detect fake news and misinformation by analyzing both textual content and visual context (images) simultaneously. This module serves as a core component of the TrueScope fact-checking system.

🚀 Features

  • Multimodal Synergy: Combines visual context (images) and textual claims to detect contradictions and sophisticated fake news.
  • Fine-Tuned LLM: Utilizes a custom fine-tuned gemma-3-4b-it base model with LoRA adapters (PEFT) trained on rumor and fake news datasets.
  • Production-Ready API: High-performance, asynchronous REST API built with FastAPI.
  • Containerized Deployment: Fully containerized using Docker for seamless deployment on cloud platforms like Hugging Face Spaces.

🛠️ Tech Stack

  • Deep Learning: PyTorch, Hugging Face Transformers, PEFT (LoRA), Safetensors
  • Backend: FastAPI, Uvicorn, Requests
  • Image Processing: Pillow (PIL)
  • Deployment: Docker

📡 API Documentation

Endpoint: /predict

Analyzes a given image URL and news text to classify the content as real or fake.

  • Method: POST
  • Content-Type: application/json

Request Body Example:

{
  "image": "[https://upload.wikimedia.org/wikipedia/commons/4/46/Leonardo_Dicaprio_Cannes_2019.jpg](https://upload.wikimedia.org/wikipedia/commons/4/46/Leonardo_Dicaprio_Cannes_2019.jpg)",
  "text": "Is this news REAL or FAKE? Content: Breaking: Leonardo DiCaprio has officially announced that he is quitting acting forever to become a full-time monk in Tibet.\nAnswer:"
}

Response Example:

{
  "verdict": "fake",
  "confidenceScore": 98.24
}

About

A production-ready Multimodal Misinformation Analyzer API. Built with FastAPI and Docker, it leverages a fine-tuned Gemma-3 model via LoRA adapters to detect fake news by cross-referencing textual claims with visual context

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages