GithubHelp home page GithubHelp logo

mortafix / flashfacts Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 935 KB

A flash news website that uses AI to condense news from YouTube

Home Page: https://news.moris.dev

Python 55.39% CSS 18.81% JavaScript 8.47% HTML 17.33%
ai news youtube chatgpt gemini

flashfacts's Introduction

Flash Facts

Flash Facts is a mini-news website that uses AI to condense news/facts from YT videos.

Flash Facts provides quick and concise news summaries by leveraging artificial intelligence. It gathers news from various sources on YT and delivers them in a condensed format, making it easy to stay updated with minimal effort.

Features

  • AI-Powered Summarization: Uses AI models (like ChatGPT and Gemini) to summarize news articles.
  • Diverse News Sources: Aggregates news from multiple YT channels and/or playlists.
  • User-Friendly Interface: Simple and modern web GUI.

Prerequisites

Before the first run, you’ll need the following API keys:

  1. Gemini API key: required for generating news summaries.
  2. YouTube Data API V3 key: required for fetching videos from YouTube.
  3. [Optional] Unsplash API key: needed, if you want, to get automatically images from Unsplash.

Installation & Setup

To get started, follow these steps

# clone the repo
git clone https://github.com/yourusername/FlashFacts.git
cd FlashFacts

# create a virtual environment
python -m venv venv
source venv/bin/activate # linux and macos
.\venv\Scripts\activate # windows

# install the requirements
pip install -r requirements.txt

Use the --setup argument and fill up the information needed

python app.py --setup

Usage

There are two ways to run the script to fetch and generate news:

  1. Provide a CSV of sources
python app.py -s examples/sources.csv
# example of sources
category    language    type        channel     id
news        en          channel     BBC         @BBCNews
news        it          playlist    Euronews    PLGWKgaTMGTQs65mOM0B_UgwDUzL2BXGcd
...

Optional parameters:

  • -d: Specify the number of days to go back for videos.
# get last 7 days videos of the sources provided
python app.py -s examples/sources.csv -d 7
  1. Provide a folder containing transcripts in text format
python app.py -t examples/transcripts

General optional parameters

  • -l: Specify the output language.
python app.py -s examples/sources.csv -l italian
  • -o: Specify the output file path.
python app.py -s examples/sources.csv -o output_folder/result
  • -f: Specify the output format.
python app.py -s examples/sources.csv -f json
  • --save-on-mongo: Save the output in a MongoDB collection.
python app.py -s examples/sources.csv --save-on-mongo

To use this last feature you need to setup the MongoDB connection.

python app.py --setup mongo

Web GUI

In order too Run the web interface, you only need to run the script with --gui.
WARNING: Web GUI, for now, onyl works with data on MongoDB

python app.py --gui

and go to http://localhost:8200. You can change host and port with the setup

python app.py --setup gui

Check out a working example: news.moris.dev

Future Additions

  • OpenAI support (ChatGPT API)
  • Web GUI news from local folders

flashfacts's People

Contributors

mortafix avatar dependabot[bot] avatar

Watchers

 avatar Kostas Georgiou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.