Skip to content

crony-io/aidebate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖⚔️ AI Debate Arena

A Gradio web app where two AI models debate any topic you choose. A third AI model acts as an impartial analyst to determine the winner.

Demo

https://huggingface.co/spaces/randrewsv/ai-debate

Prerequisites

  • Python 3.9+
  • Hugging Face Account (free): Required for API access to AI models
    • Sign up at huggingface.co
    • The app uses the HF Inference API to run LLMs without local GPU requirements

Setup

  1. Create virtual environment

    python -m venv venv
  2. Activate venv

    # Windows
    venv\Scripts\activate
    
    # Linux/Mac
    source venv/bin/activate
  3. Install dependencies

    pip install -r requirements.txt

Running

python app.py

Open the URL shown in terminal (default: http://127.0.0.1:7860).

Usage

  1. Click Login with Hugging Face in the sidebar
  2. Enter a debate topic
  3. Select models for Bot 1, Bot 2, and Analyst
  4. Click Start Debate

Project Structure

src/
├── __init__.py    # Package metadata
├── config.py      # Models list, CSS, constants
├── clients.py     # HuggingFace API client setup
├── streaming.py   # Real-time response streaming
├── debate.py      # Debate orchestration logic
└── ui.py          # Gradio interface

License

MIT

About

A Gradio web app where two AI models debate any topic you choose.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages