Няма описание

jherve 48734cb46a Add some proper documentation преди 1 година
src 52b7d4b4de Change the project name преди 1 година
static 3501a02749 Add logo information and display it in the UI преди 1 година
templates 70d9705643 [fix] URLs now use the virtual_timestamp instead of an ID преди 1 година
tests 1c91c4bfe6 Initial commit преди 1 година
.gitignore d51ff03bb2 Switch to Annoy for vector search/indexing преди 1 година
CHANGELOG.md 48734cb46a Add some proper documentation преди 1 година
ISSUES.md 48734cb46a Add some proper documentation преди 1 година
README.md 48734cb46a Add some proper documentation преди 1 година
config.py caa854cba8 Format some file преди 1 година
install-git-hooks.sh d120dfd089 Add a script to install commit git hooks преди 1 година
pyproject.toml 91fa1e33ef Bump to version 0.2.0 преди 1 година
requirements-dev.lock cf34257719 Extend duration display to similar articles преди 1 година
requirements-embeddings.lock 5d907e27a8 Add a requirements file for embeddings преди 1 година
requirements.lock cf34257719 Extend duration display to similar articles преди 1 година
settings.toml 48734cb46a Add some proper documentation преди 1 година

README.md

Media Observer

A data / AI project to capture / analyse the evolution over time of the frontpages of main media sites.

The basic process consists of :

  • finding snapshots of those sites as they were at precise times of the day (e.g. at 8h, 12h, 18h and 22h),
  • parse those snapshots to extract relevant info (e.g. the main headline),
  • store that info in a local database,
  • find semantic similarities within the headlines using language models

A basic web UI is available to display the results.

At the moment, 6 sites are supported (see them there) but the list will expand over time.

None of this would be possible without the incredible Wayback Machine and the volunteers that have helped setup the snapshotting of all those sites for decades.

Installation

First you need to setup a PostgreSQL server and create a database whose path / credentials will be stored in a file .secrets.toml with the key database_url.

database_url="postgresql://user:password@yourdomain.com:port/database_name

With Rye

  1. Install Rye project manager (following instructions from https://rye.astral.sh/guide/installation/)
  2. Install dependencies : rye sync --no-lock --no-dev --all-features

Running the project

Setup your preferences by updating the configuration file

With Rye

  • Do the site snapshots : rye run snapshots
  • Compute the embeddings : rye run embeddings
  • Build the similarity index : rye run similarity_index
  • Run the web server : rye run web_server