The front-end for Tweetailyze, a webapp that summarizes a Twitter account's tweets through embedding/clustering of tweets, w/ sentiment analysis and topic modeling.
- POSTs a Twitter account's username to the backend.
- Gets the most recent X tweets using the tweepy package.
- The text of each tweet is preprocessed using the nltk package.
- The preprocessed text is transformed into embeddings using OpenAI model 'text-embedding-ada-002'
- The embeddings are clustered using agglomerative clustering with cosine metric and average linkage.
- The tweets are separated into clusters based on their cluster labels.
- Sentiment analysis is performed using the VADER sentiment analyzer.
- Topic modeling is performed using non-negative matrix factorization (NMF) from the scikit-learn package.
- The top words for each topic are classified using the OpenAI model 'text-curie-001'.
- Results are stored to Postgres and returned to the frontend.