Inspiration

Online misinformation plagues the world as we speak. It's often easy to believe what we read, but it's even more important to be aware of the information that we are actually taking in. I wanted to make a convenient way for people to avoid this issue and integrate my artificial intelligence knowledge in the process.

GOOGLE DOC REPORT (ALSO IN "TRY IT OUT" LINKS): https://docs.google.com/document/d/1cKKD8i6onVxeQJHo-UIKjsAMPw7hTmgTYW8_x415pRs/edit?usp=sharing

What it does

  1. The Chrome extension listens for the click of a button, grabs HTML text and sends that text to a backend API.
  2. The backend is built with FastAPI, and deployed using a personal server via uvicorn.
  3. When it receives text via a POST request, it uses a transformer model (DistilBERT) from the Hugging Face Transformers library to analyze the text. Due to a token limit, it also uses a chunking approach to split the text and analyze it.
  4. The result is sent back to the extension, which displays it instantly in the browser without the user needing to leave the page.

How we built it

I mainly used javascript and HTML to write the frontend and UI. Content.js fetches the content from the web page and sends it to the backend. It's also responsible for the button's functions. Popup.html gives the user a small interface when clicking the chrome extension icon. Manifest.json is for the extension's permissions and how it integrates with chrome. Background.js is there but most work happens in content.js

The backend is fully written in Python. It's a FastAPI application that receives JSON with the article text, uses machine learning/NLP models to analyze it, and returns a response with data (sentiment, political bias, trustworthiness, etc) for the frontend to display.

It is deployed via a personal uvicorn server. I actually have this project on google cloud, but I realized that since it isn't being used at a high level and isn't being scaled, it is easier to simply use uvicorn on my personal computer and test it out that way. However, in version 2, I will used google cloud and scale this application.

Challenges we ran into

Finding the right models for each purpose was difficult. I also had to debug the code alot, and I ran into some memory consumption issues due to the importing of large natural language processing models. However, I was able to get it working. I also spent a long time setting up the server, and I had to keep increasing the memory because the models were using a lot of memory.

Accomplishments that we're proud of

I'm proud of the functionality and convenience of my product. Once it's set up, it's really easy to use. It just needs one button click to analyze and spit out information. I'm also proud that I was able to use different models to find different types of data about the text. It's not just trustworthiness: there's a summary, a sentiment analysis, and political bias.

What we learned

  • FastAPI and creation of backend in Python
  • HuggingFace library and NLP models in Python
  • CORs middleware and deployment challenges on Render and Google Cloud
  • Learned to extract web content and interactions between frontend and backend
  • Created UI and frontend development using Javascript and HTML (json included)
  • Debugged issues such as JSON parsing and network errors

What's next for INFORMD - Version 1

For version 2, I plan to:

  • Fine tune each model and upload to hugging face library using pre-existing datasets
  • Switch model for summarization, maybe openAI model or something already prominent
  • Access a database for reputable domains
  • Succesfully launch a google cloud server for scalability, rather than a personal server

Extra Notes

Share this project:

Updates