Skip to content

gabrielhwilliams/brainrot-agent

Repository files navigation

Brainrot Agent

A TikTok-themed web app that analyzes your content consumption patterns with animated results.

Quick Start

1. Install Dependencies

# Create virtual environment
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # macOS/Linux

# Install packages
pip install -r requirements.txt

2. Configure (Optional)

Create a .env file for API access (app works without it):

OPENAI_API_BASE=https://api.openai.com/v1
OPENAI_API_KEY=your_key_here

3. Run

python app.py

Open: http://127.0.0.1:5000/

Testing

  1. Upload CSV: Click "Browse" and select test_data.csv (included in project)
  2. Click "Analyze": Watch the animated results appear
  3. View Results: 5 cards will appear sequentially with animations

CSV Format

Required columns:

  • type - Content type (e.g., "content_view")
  • category - Category name (e.g., "history", "science")
  • duration_sec - Duration in seconds (number)
  • completion - Completion rate 0.0-1.0 (number)

Example (test_data.csv):

type,category,duration_sec,completion
content_view,history,90,0.95
content_view,science,120,0.85

Test via API

python test_analyze.py

Or with curl:

curl -X POST http://127.0.0.1:5000/analyze -F "file=@test_data.csv"

Troubleshooting

  • Error messages: Check the terminal where python app.py is running
  • Missing dependencies: Run pip install -r requirements.txt
  • CSV errors: Ensure your CSV has all required columns (see above)
  • Port in use: Change port in app.py: app.run(debug=True, port=5001)

About

A mock example of how a model could analyze your content history to create a "wrapped" analysis of you and your year

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors