Skip to content

nebabtew/mirrormetrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 MirrorMetrics

MirrorMetrics is an AI-powered analytics platform for TikTok content analysis. It combines TikTok data scraping with advanced AI analysis using Google's Gemini to provide comprehensive insights and recommendations.

Features

  • 📊 Data Scraping: Fetch TikTok video data and metadata
  • 🤖 AI Analysis: Leverage Google Gemini for intelligent content analysis
  • 📈 Analytics Dashboard: Interactive Streamlit-based UI
  • 📋 Report Generation: Export analysis in multiple formats (HTML, Markdown)

Project Structure

mirrormetrics/
├── app.py              # Streamlit UI
├── scraper.py          # TikTok scraper
├── agent.py            # Gemini analysis agent
├── report.py           # Report formatter
├── requirements.txt    # Python dependencies
└── README.md          # This file

Installation

  1. Clone the repository:
git clone <repository-url>
cd mirrormetrics
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
# Create .env file
echo GEMINI_API_KEY=your_api_key_here > .env

Usage

Run the Streamlit application:

streamlit run app.py

The application will open in your default browser at http://localhost:8501

Configuration

Environment Variables

  • GEMINI_API_KEY: Your Google Gemini API key (required)

API Keys

  • TikTok API: Optional. If not provided, the scraper will use alternative data sources
  • Google Gemini API: Required for AI analysis features

Modules

app.py

Main Streamlit application interface. Provides a user-friendly dashboard for:

  • Configuring analysis parameters
  • Viewing collected data
  • Running AI analysis
  • Generating and downloading reports

scraper.py

Handles all TikTok data collection:

  • Fetch individual video data
  • Get trending videos
  • Extract metadata and statistics

agent.py

AI-powered analysis engine using Google Gemini:

  • Analyze content sentiment and topics
  • Predict engagement metrics
  • Generate actionable recommendations
  • Create comprehensive insights from multiple videos

report.py

Report generation and formatting:

  • Generate HTML reports
  • Generate Markdown reports
  • Export analysis results
  • Customize report formatting

Requirements

  • Python 3.8+
  • Streamlit
  • Google Generative AI
  • Requests
  • Pandas
  • Plotly

See requirements.txt for specific versions.

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues, questions, or suggestions, please open an issue on the repository.


Made with ❤️ for content creators and analysts

About

AI-powered TikTok analytics platform. Scrapes video data, runs psychographic and virality analysis via Gemini 2.5 Flash, and surfaces purchase intent, emotional spectrum, and cultural intelligence in a custom Streamlit dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages