Chrome Extension: Political Bias Analyzer (Local LLAMA + OpenAI)

A Chrome extension that analyzes political bias in news articles and web content by extracting article content and providing a visual breakdown of left vs. right political leaning percentages. The extension can leverage either a local LLAMA API or OpenAI’s API for bias analysis.

What I Learned

This was a fun project. I built a Chrome extension that reads web page content and integrates with LLM APIs and OpenAI APIs for real-time analysis. I learned to parse AI outputs and visualize data with interactive charts.

Project Repositories

Project Folder Structure

chromeextension.Ideologicallabeling/
+-- manifest.json    # Extension configuration
+-- popup.js         # Main popup interface logic
+-- hello.html       # Extension popup UI
+-- content.js       # Content script for article extraction
+-- background.js    # Background service worker
+-- README.md

LLAMA Edition

The LLAMA edition uses a local LLAMA API for bias analysis, allowing the extension to run against a locally hosted model instead of relying on a hosted LLM provider.

OpenAI Edition

The OpenAI edition uses OpenAI’s API for real-time article analysis and response generation. The extension extracts article content from the page, sends it for analysis, parses the model response, and renders a visual left vs. right leaning breakdown in the popup UI.

Share :

Related Posts

Fine-Tuning GPT-2 on CFPB Dataset with ONNX and Gradio

What I LearnedWork with real-world datasets: Cleaning and preparing the CFPB dataset for model training. Dataset: [CFPB Consumer Finance Complaints](https://huggingface.co/datasets/CFPB

read more

Multi-Tool AI Agent - Document Processing with LLMs, TTS & Image Generation

An intelligent, multi-tool AI agent that automatically processes documents using LLMs, TTS, and image generation, all orchestrated through a SQLite database and a Gradio web interface. What I Lear

read more

NASA APOD Explorer + AI Narrator (Gradio App with OpenAI)

A lightweight Gradio app that fetches NASA's Astronomy Picture of the Day (APOD) and generates a concise, human-friendly narration using OpenAI. It supports HD images, date selection, graceful handlin

read more

RAG for Tabular Datasets

What I Learned My goal for this project was to deeply understand Retrieval-Augmented Generation (RAG) using a tabular dataset, moving beyond unstructured text use cases. I worked with a r

read more

Sales Update AI Assistant (Running on HuggingFace - Space)

Sales leaders often receive long narrative updates from team members through email or chat. These updates contain useful information, but they are often inconsistent, difficult to compare week to

read more