Inspiration

In light of recent events and propaganda surrounding Ukraine and Russia, I was inspired to create a site that spreads awareness on misinformation and fake, flashy headlines.

Model

We used a naive bayes algorithm through SKLearn to predict the authenticity of political news titles. I also used SKLearn to create my vectorizer, fit my model, and more. As for mydata, we grabbed it from Kaggle, modifying it to fit my needs. Finally, We used pandas for typical data stuff.

Frontend

We used React, the New York Times API, and ChakraUI's UI Library for the front end. The front end communicates with the backend through API, and fetches results. Similarly, the front end fetches New York Times articles through their API and returns headlines, images, and web urls to create the news discovery feature of the site. Together, these components make up the landing page and the functionality of the site. We also tried to deploy the site through Docker, but we didn't realize we had to pay.

Backend

Finally, we created the backend API through Fast API, and Uvicorn. FastAPI helped generate a quick api to use to communicate between frontend and backend. Uvicorn on the other hand, is just a simpler gunicorn alternative.

Accomplishments

This is the first time I've ever worked with most of this stuff, same for Tomato. Most Especially, this is their first hackathon and they're v new to the space, so it was tough, but we made it. I pulled an all nighter trying to get everything done. It was so exhausting, but I learned so much, especially about Python and backend.

Tech Stack / Resources

  • Python Frontend, React Backend
  • Python: Uvicorn, SkLearn, Pandas, Itertools, FastAPI
  • React: New York Times API, Chakra UI

Misc:

  • Kaggle

Related

How to Demo (incase you want to)

  1. Clone the repo
  2. Switch to the no-docker branch
  3. Install Python reqs cd backend pip install -r requirements.txt
  4. Install npm reqs cd ../frontend npm install
  5. Create two terminals, one for python, one for npm Python cd ../backend/app/ py main.py NPM cd ../frontend npm start

Built With

Share this project:

Updates