The API used by the Indy News assistant.
It uses a selection of trusted news sources to retrieve their publications for a time window and a potential topic of interest.
Prerequisites: Please first log in to X and log your cookies an place them in .env
under X_COOKIE
. It should look like this:
X_COOKIES=' lang=en; guest_id=123; night_mode=2; _twitter_sess=ABC--DEF; d_prefs=GJHHJVS; guest_id_ads=v1%3A1223423434; guest_id_marketing=v1%3A23423423423; personalization_id="v1_dasdiuhjKIvhhb=="; kdt=KJBNDFSbfsdksLKSDFJSDF; auth_token=sfsefsdfs234n2bn34j23kj4n2k; ct0=jsdfkdnksdndajsk21323kjn42kj; att=1kjfnaskNknlnlsfsaldkf; lang=en; twid=u%3D1342342342'
It also contains some endpoints to see where the ratings come from:
- all.csv: our source selection of media outlets
- allsides.com.json: snapshot of the AllSides db
- mediabiasfactcheck.com.json: snapshot of the MediaBiasFactCheck db
-
Install and activate
.venv
andpip install -r requirements.txt
-
Run
- FastAPI:
.venv/bin/uvicorn --host "0.0.0.0" -p 8088
- StreamLit
.venv/bin/streamlit run Home.py