Inspiration
This app was inspired by the surge in news stories recently. The plan was to create an app that presents news in digestible format and automate the process.
What it does
The app retrieves popular news stories and uses a machine learning model to create a summarized version of the article. The app then displays it for the users.
How I built it
The application is divided into three parts, the model, the data retrieval, and the web page where the news stories are served.
The model I used to summarize the news articles is the T5 model from Google. I used huggingface's library to utilize the 't5-small' version of the model. The model was then fine-tuned using PyTorch Lightning on the CNN/Daily Mail dataset. The Google Colab notebook used is https://colab.research.google.com/drive/1qSyCcNG8q2ZQ7g2c4hY4UGoqtcF8_HgE?usp=sharing.
The model was then used for inference and hosted on AWS's ECS. The ECS container retrieved articles from https://newsapi.org/ and utilized the fine tuned model to create the summarized articles. The summaries were then stored in a DynamoDB database.
Lastly, the web page where the model is deployed in a react native progressive web application. The application is hosted on Firebase and utilizes the AWS Gateway to have a Restful API to retrieve the latest summaries from the DynamoDB database.
Challenges I ran into
One of the main challenges I ran into was the processing power needed to fine tune the T5 model. The base model of T5 has 220m parameters which was too large for the model to be trained efficiently on Google Colab. As a result I focused on using the smaller version with _ only _ 60m parameters.
Another challenge that I ran to was deploying the inference model on ECS as this was the first time I worked with Amazon Web Services.
Accomplishments that I'm proud of
Learning about a new model and fine-tuning it from scratch. Utilizing AWS to create a seamless end product.
What's next for Daily Brief
Currently, the summaries work well enough however, there often cases with ill grammar or punctuation. This could be solved with using the a larger version of the T5 model.
Built With
- amazon-dynamodb
- amazon-ecs
- amazon-web-services
- huggingface
- pytorch
- react
Log in or sign up for Devpost to join the conversation.