Skip to content

TikTok Text Sentiment and Analytics Dashboard

Python · PostgreSQL · Google Gemini · Streamlit · Plotly · GitHub Actions

Overview

This project analyzes TikTok-related text that is already stored in a PostgreSQL table. A scheduled Python job selects unanalyzed rows, asks the Gemini API to classify sentiment and produce a short Polish summary, then saves the result. A Streamlit dashboard presents the analyzed records and engagement metrics.

Workflow

  • Read pending text and post metadata from PostgreSQL.
  • Classify sentiment as positive, neutral, or negative and generate a one-sentence summary in Polish with Google Gemini.
  • Write the analysis back to PostgreSQL, with a delay and handling for API rate limits.
  • Run the agent on a GitHub Actions schedule or manually.
  • Explore sentiment distribution, popular posts, and filtered records in the Streamlit dashboard.

Technologies

Python, PostgreSQL, psycopg2, Google Gemini API, python-dotenv, Streamlit, Pandas, Plotly Express, GitHub Actions.

Scope

The repository processes text already present in the database; it does not collect or scrape content from TikTok. The dashboard reads from the configured database and caches results briefly, so “live” should not be interpreted as instant streaming analytics.