X/Twitter Legitimacy Detector banner

X/Twitter Legitimacy Detector

9 devlogs
20h 36m 47s

A detector that uses X/Twitter API to get the text of posts, and put them through a machine learning model to see the legitimacy of the post

Helps people not fall for ragebait ;)

This is my first project on Flavortown. I'm excited to share m…

A detector that uses X/Twitter API to get the text of posts, and put them through a machine learning model to see the legitimacy of the post

Helps people not fall for ragebait ;)

This is my first project on Flavortown. I’m excited to share my progress!

This project uses AI

I used AI to search documentation for packages like python postgres and my model itself technically counts as AI

Demo Repository

Loading README...

Farhan Hossain

Shipped this project!

Hours: 20.61
Cookies: 🍪 212
Multiplier: 10.31 cookies/hr

This took some experimentation. I started with Naive Bayes but changed to Logistic Regression because it got better results. The most annoying part was actually shipping it, because I haven’t shipped something real in too long. Also prod code always finds its way to break :P

Farhan Hossain

Finallyyyyyy

Today I’ll be deploying X/Twitter Misinformation Classifier. The code is pretty messy, so I’ll have to clean that up soon.

Other than that, I plan on:

  • Creating loading in case the Render backend is booting up
  • Cleaning up UI
  • Cleaning up code and make it easier for others to contribute if they want to
  • training more models that read blocks of text from other social media platforms to check for misinformation. Let me know which social media platform you would want for that!

Try it here (Might not work as well on posts after 2023): https://x-twitter-misinformation-classifier.vercel.app/

Attachment
0
Farhan Hossain

Ramadan Mubarak!

I have come back after a MONTH of inactivity (Had a lot of summer programs that I had to apply for and FRC). However, we do have the feedback system through Postgres, and I think I am ready for deployment and making a demo

At this point, I will work on

  • Deploying using Render and vercel
  • Documentation and code cleanup

Stuff for the future???:

  • Tune the model or switch to neural networks (if it’s any better)
  • Learn Docker to containerize the project
  • Use other social media platforms (if I get the data and the api isnt horrid)
  • Make it easier for others to get set up on the project

There also seems to be a bug, or something wrong with the Twitter API. Sometimes, when you make a request, it returns an error that says the servers for the API are full. Maybe there are better alternatives to the X API, or I will consider buying a membership if the project is actually serious.

Attachment
0
Farhan Hossain

I finally made my homepage! It looks pretty basic but for classifying tweets being its only task, I would say it is suitable. I didn’t really work with the machine learning model, but here is stuff I would like to add:

  • Notification system showing an error in the user’s request, or rate limits (Twitter being stingy with 1 classification per 15 minutes :/ )
  • Possibly other forms of social media (Thinking about reddit)
  • A feedback system where if the classification is right, the user can put a thumbs up, and a wrong classifcation for a thumbs down, to be stored in postgres and then train the model better

Also, I did get cooked on the report card lmao

Attachment
0
Farhan Hossain

New updates!

  • Used X’s API to use twitter links instead of tweet text for a more convenient classification
  • Now predictions show confidence, however new tweets are uncertain (in the images)
  • Used Logistic Regression instead of Naive Bayes (Works a lot better by ~2% on accuracy and precision, and ~3% on F1 score and recall)
    To work on:
  • I have settled on Logistic Regression, changing models will not do too much, and I am better off fine tuning the model for better classification on newer posts (Anything remotely political is classified as misinformation 😭)
  • Obviously work on the website, I have put off on this for a while
    Also pray for a miracle on my report cards im lowkey cooked lol
Attachment
Attachment
Attachment
0
Farhan Hossain

I’ve been slacking off a bit due to midterms, but I am back! Today I added the integration to a frontend. And I realized Naive Bayes doesn’t work too well for classifying Twitter/X posts. These two classifications were cherrypicked.

Next:

  • Try different models like Logistic Regression
  • Improve frontend
  • Integrate X/Twitter API so users can send links instead of the tweet text
Attachment
Attachment
0
Farhan Hossain

Happy new year everyone! I finally found a dataset for my naive bayes model, however it is performing considerably worse. Idk if I will switch to something like logistic regression or smth, but for now I have it on flask

Attachment
0
Farhan Hossain

Worked on preprocessing the tweets for the first day, and I am currently researching how the Multinomial Naive Bayes model works

Attachment
0