Skip to content

AI-powered logical fallacy, bias, and persuasion analyzer for arguments, essays, and debates, built with Python and Streamlit and powered by Groq-hosted LLMs. Features fallacy span highlighting, scoring (clarity, persuasiveness, reliability), batch CSV analysis, and multi-model comparison.

License

Notifications You must be signed in to change notification settings

wiqilee/fallacylens-groq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 FallacyLens (Groq Edition)

FallacyLens is an AI-powered logical fallacy detection toolkit for arguments, essays, and debates.

This version uses the Groq Chat Completions API (e.g. llama-3.3-70b-versatile) as the reasoning engine. Your Python code controls the prompt, parsing, and presentation.


🔴 Live demo

Try the public demo on Streamlit Cloud:

👉 https://fallacylens-groq-wiqilee.streamlit.app

⚠️ This demo uses a shared Groq API key.
Please avoid automated or excessive requests.


✨ Features

  • Logical fallacy span detection with severity + confidence
  • Inline highlighting for detected fallacies in your text
  • Clarity / Persuasion / Reliability scores (0–100)
  • Assistant tools: rewrite, teacher feedback, persuasion optimizer, bias review
  • Batch CSV analysis (column: text)
  • Multi-model comparison across Groq-hosted models

🧰 Tech Stack

  • Python
  • Streamlit (demo UI)
  • FastAPI (service API)
  • Groq Chat Completions API (LLM inference)

⚙️ Setup

  1. Create a Groq API key at https://console.groq.com.

  2. Export your key as an environment variable:

    export GROQ_API_KEY="YOUR_REAL_GROQ_API_KEY"

    For quick local testing only, you can also edit fallacylens/detector.py and replace the string "YOUR_GROQ_API_KEY_HERE" with your real key, but you must not commit that to GitHub.

  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the Streamlit demo:

    streamlit run demo/app.py
  5. Run the FastAPI service:

    uvicorn api.main:app --reload

🗂️ Project Structure

.
├─ api/                 # FastAPI service
├─ demo/                # Streamlit demo app
├─ fallacylens/         # Core library (detector, models, taxonomy)
├─ requirements.txt
└─ README.md

🔐 Security Notes

  • Never commit secrets (API keys, .env, or Streamlit secrets).
  • Use environment variables (recommended) or your deployment platform’s secret manager.
  • This repo includes a .gitignore that helps prevent accidental commits of credentials.

👤 Author

Built by Wiqi Lee
X / Twitter: @wiqi_lee


📄 License

MIT — see LICENSE.

About

AI-powered logical fallacy, bias, and persuasion analyzer for arguments, essays, and debates, built with Python and Streamlit and powered by Groq-hosted LLMs. Features fallacy span highlighting, scoring (clarity, persuasiveness, reliability), batch CSV analysis, and multi-model comparison.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages