File size: 921 Bytes
7707108
73bcf15
 
 
 
7707108
73bcf15
7707108
 
 
73bcf15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
title: Tweet Sentiment Classifier
emoji: 🐦
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
---

# Tweet Sentiment Classifier

Compare 5 different sentiment analysis models side-by-side on tweet text:

- **BERTweet** (Transformer) - Fine-tuned from `vinai/bertweet-base`
- **Decision Tree** (TF-IDF)
- **Random Forest** (TF-IDF)
- **Logistic Regression** (TF-IDF)
- **Linear SVM** (TF-IDF)

## How it works

Type or paste a tweet and click "Analyze Sentiment" to see predictions from all 5 models simultaneously.

## First run

Models download and train on first request (~2-3 minutes). Subsequent requests are instant thanks to caching.

## Tech Stack

- **Frontend**: HTMX for reactive updates
- **Backend**: Flask
- **Models**: HuggingFace Transformers (BERTweet) + scikit-learn
- **Data**: SetFit/tweet_sentiment_extraction dataset

Built as a class project for DAT158 Machine Learning.