# HeadlineHound

HeadlineHound is a Typescript-based project that uses natural language processing to summarize news articles for you. With HeadlineHound, you can quickly get the key points of an article without having to read the entire thing. It's perfect for anyone who wants to stay up-to-date with the news but doesn't have the time to read every article in full. Whether you're a busy professional, a student, or just someone who wants to be informed, HeadlineHound is a must-have tool in your arsenal.

## How it Works

HeadlineHound uses natural language processing (NLP) via a fine-tuned ChatGPT to analyze and summarize news articles. It extracts the most relevant sentences and phrases from the article to create a concise summary. The user simply inputs the URL of the article they want summarized, and HeadlineHound does the rest.

## How we built it

We first fine-tuned a ChatGPT model using a dataset containing news articles and their summaries. This involved a lot of trying different datasets, testing various different data cleaning techniques to make our data easier to interpret, and configuring OpenAI LLM in about every way possible :D. Then, after settling on a dataset and model, we fine-tuned the general model with our dataset. Finally, we built this model into our webapp so that we can utilize it to summarize any news article that we pass in. We first take in the news article URL, pass it into an external web scraping API to extract all the article content, and finally feed that into our LLM to summarize the content into a few sentences.

## Challenges we ran into

Our biggest challenge with this project was trying to determine which dataset to use and how much data to train our model on. We ran into a lot of memory issues when trying to train it on very large datasets and this resulted in us having to use less data than we wanted to train it, resulting in summaries that could definitely be improved. Another big challenge that we ran into was determining the best OpenAI model to use for our purposes, and the best method of fine-tuning to apply.

## Accomplishments that we're proud of

We are very proud of the fact that we were able to so quickly learn how to utilize the OpenAI APIs to apply and fine-tune their generalized models to meet our needs. We quickly read through the documentation, played around with the software, and were able to apply it in a way that benefits people. Furthermore, we also developed an entire frontend application to be able to interact with this LLM in an easy way. Finally, we learned how to work together as a team and divide up the work based on our strengths to maximize our efficiency and utilize our time in the best way possible.

## What we learned

We learned a lot about the power of NLP. Natural language processing (NLP) is a fascinating and powerful field, and HeadlineHound is a great example of how we can use LLMs can be used to solve real-world problems. By leveraging these generalized AI models and then fine-tuning them for our purposes, we were able to create a tool that can quickly and accurately summarize news articles. Additionally, we learned that in order to create a useful tool, it's important to understand the needs of the user. With HeadlineHound, we recognized that people are increasingly time-poor and want to be able to stay informed about the news without having to spend their precious time reading articles. By creating a tool that meets this need, we were able to create something that people saw value in.

## What's next for Headline Hound

Here are a few potential next steps for the HeadlineHound project:

Improve the summarization algorithm: While HeadlineHound's summarization algorithm is effective, there is always room for improvement. One potential area of focus could be to improve the algorithm's ability to identify the most important sentences in an article, or to better understand the context of the article in order to generate a more accurate summary.

Add support for more news sources: HeadlineHound currently supports summarizing articles from a wide range of news sources, but there are always more sources to add. Adding support for more sources would make HeadlineHound even more useful to a wider audience.

Add more features: While the current version of HeadlineHound is simple and effective, there are always more features that could be added. For example, adding the ability to search for articles by keyword could make the tool even more useful to users.
## Inspiration

Why is science inaccessibility such a problem? Every year, there are over two million scientific research papers published globally. This represents a staggering amount of knowledge, innovation, and progress. Yet, around 91.5% of research articles are never accessed by the wider public. Even among those who have access, the dense and technical language used in academic papers often serves as a barrier, deterring readers from engaging with groundbreaking discoveries.

We recognized the urgent need to bridge the gap between academia and the general public. Our mission is to make scientific knowledge accessible to everyone, regardless of their background or expertise. Open insightful.ly: You are presented with 3 top headlines, which are summarized with cohere as “news headlines” for each research article. You also see accompanying photos that are GPT produced.

## What it does

Our goal is that by summarizing long research articles that is difficult to read into headlines that attract people (who can then go on to read the full article or a summarized version), people will be more encouraged to find out more about the scientific world around them. It is also a great way for talented researchers who're writing these articles to gain publicity/recognition for their research. To make the website attractive, we'll be generating AI generated images based on each article using OpenAI's DALL-E 2 API. The site is built using Python, HTML, CSS using Pycharm.

## How we built it

1. Content Aggregation: We start by aggregating peer reviewed research papers from google scholar.
2. Cohere Summarizer API: To summarize both the essence of these papers and to generate a news headline, we used the Cohere Summarizer API.
3. User-Friendly Interface: Building using Python, we designed a scroller web app, inspired by Twitter and insta and the reliability of respected news outlets like The New York Times. Users can explore topics on 'you, 'hot,' and 'explore' pages, just like they would on their favorite news website while being captivated with the social media type attention grabbing scroll app.
4. AI-Generated Visuals: To enhance the user experience, we integrated OpenAI's DALL-E 2 API, which generates images based on each research article. These visuals help users quickly grasp the essence of the content.
5. User Engagement: We introduced a liking system, allowing users to endorse articles they find valuable. Top-liked papers are suggested more frequently, promoting quality content.

## Challenges we ran into

During the development of Insightful.ly, we faced several challenges. These included data aggregation complexities, integrating APIs effectively, and ensuring a seamless user experience. We also encountered issues related to data preprocessing and visualization. Overcoming these hurdles required creative problem-solving and technical agility.

## Accomplishments that we're proud of

We take immense pride in several accomplishments. First, we successfully created a platform that makes reading long research articles engaging and accessible. Second, our liking system encourages user engagement and recognition for researchers. Third, we integrated advanced AI technologies like Cohere Summarizer and OpenAI's DALL-E 2, enhancing our platform's capabilities. Lastly, building a user-friendly web app inspired by social media platforms and respected news outlets has been a significant achievement

## What we learned

Our journey with Insightful.ly has been a profound learning experience. We gained expertise in data aggregation, API integration, web development, user engagement strategies, and problem-solving. We also honed our collaboration skills and became proficient in version control. Most importantly, we deepened our understanding of the impact of our mission to make science and knowledge accessible.

## What's next for Insightful.ly

In the next phase of Insightful.ly, our primary focus is on enriching the user experience and expanding our content. We're committed to making knowledge accessible to an even wider audience by incorporating research articles from diverse domains, enhancing our user interface, and optimizing our platform for mobile accessibility. Furthermore, we aim to harness the latest AI advancements to improve summarization accuracy and generate captivating visuals, ensuring that the content we deliver remains at the forefront of innovation. Beyond technical improvements, we're building a vibrant community of knowledge seekers, facilitating user engagement through features like discussion forums and expert Q&A sessions. Our journey is marked by collaboration, partnerships, and measuring our impact on knowledge accessibility. This is just the beginning of our mission to make knowledge more accessible and insightful for all.
## What it does

MusiCrowd is an interactive democratic music streaming service that allows individuals to vote on what songs they want to play next (i.e. if three people added three different songs to the queue the song at the top of the queue will be the song with the most upvotes). This system was built with the intentions of allowing entertainment venues (pubs, restaurants, socials, etc.) to be inclusive allowing everyone to interact with the entertainment portion of the venue.

The system has administrators of rooms and users in the rooms. These administrators host a room where users can join from a code to start a queue. The administrator is able to play, pause, skip, and delete and songs they wish. Users are able to choose a song to add to the queue and upvote, downvote, or have no vote on a song in queue.

## How we built it

Our team used Node.js with express to write a server, REST API, and attach to a Mongo database. The MusiCrowd application first authorizes with the Spotify API, then queries music and controls playback through the Spotify Web SDK. The backend of the app was used primarily to the serve the site and hold an internal song queue, which is exposed to the front-end through various endpoints.

The front end of the app was written in Javascript with React.js. The web app has two main modes, user and admin. As an admin, you can create a ‘room’, administrate the song queue, and control song playback. As a user, you can join a ‘room’, add song suggestions to the queue, and upvote / downvote others suggestions. Multiple rooms can be active simultaneously, and each room continuously polls its respective queue, rendering a sorted list of the queued songs, sorted from most to least popular. When a song ends, the internal queue pops the next song off the queue (the song with the most votes), and sends a request to Spotify to play the song. A QR code reader was added to allow for easy access to active rooms. Users can point their phone camera at the code to link directly to the room.

## Challenges we ran into

* Deploying the server and front-end application, and getting both sides to communicate properly.
* React state mechanisms, particularly managing all possible voting states from multiple users simultaneously.
* React search boxes.
* Familiarizing ourselves with the Spotify API.
* Allowing anyone to query Spotify search results and add song suggestions / vote without authenticating through the site.

## Accomplishments that we're proud of

Our team is extremely proud of the MusiCrowd final product. We were able to build everything we originally planned and more. The following include accomplishments we are most proud of:

* An internal queue and voting system
* Frontloading the development & working hard throughout the hackathon > 24 hours of coding
* A live deployed application accessible by anyone
* Learning Node.js

## What we learned

Garrett learned javascript :) We learned all about React, Node.js, the Spotify API, web app deployment, managing a data queue and voting system, web app authentication, and so so much more.

## What's next for Musicrowd

* Authenticate and secure routes
* Add IP/device tracking to disable multiple votes for browser refresh
* Drop songs that are less than a certain threshold of votes or votes that are active
* Allow tv mode to have current song information and display upcoming queue with current number of votes