Spaces:
Sleeping
Sleeping
File size: 3,504 Bytes
d374df1 3911020 d374df1 3911020 b6953c9 d374df1 3911020 d374df1 3911020 200b5d1 3911020 200b5d1 3911020 965f3e7 3911020 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | ---
title: Spinoza
emoji: 🐨
colorFrom: green
colorTo: indigo
sdk: gradio
sdk_version: 4.37.2
python_version: "3.10"
app_file: app.py
pinned: false
hf_oauth: true
---
# Spinoza Project
Reporters Without Borders (RSF) has teamed up with the General Information Press Alliance (the Alliance) to initiate the first step of its **Spinoza project** to develop an artificial intelligence tool by and for journalists that will safeguard the media’s intellectual property over what they publish. You can find more information <a href="https://rsf.org/en/rsf-and-french-general-press-alliance-launch-spinoza-project-develop-ai-tool-journalists" target="_blank">here</a> and <a href="https://rsf.org/en/journalists-france-test-spinoza-project-s-first-ai-prototype-launched-rsf-and-alliance" target="_blank">here</a>.
A visual and guided introduction to the artificial intelligence tool can be found in the <a href="https://www.youtube.com/@reporterssansfrontieres" target="_blank">RSF's Youtube Channel</a>. You can have a look just below.
<iframe width="560" height="315" src="https://www.youtube.com/embed/iBy6IBSxRkw?si=zjissjcLEOJv7cwP" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
## Table of Contents
- [Documentation](#documentation)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
## Documentation
For a step-by-step guide on how to replicate Spinoza in a private space and integrate your own specialized "sub-RAG" using Google Colab, please refer to our [Tutorial for Replication](https://huggingface.co/datasets/SpinozaProject/spinoza-database/blob/main/Spinoza%20Tutorial%20for%20replication.pdf).
## Installation
1. Clone the repository (SSH):
```bash
git clone https://huggingface.co/spaces/SpinozaProject/spinoza
```
2. Install dependencies:
```bash
poetry install
```
Note that we highly recommend to create a new env :
```bash
conda create -n myenv python=3.10
conda activate myenv
pip install poetry
```
## Usage
To run the project in local workspace, use the following command:
```bash
python app.py
```
## Maintenance notes
**Python version is pinned to 3.10** (`python_version: "3.10"` in the YAML
header above). The dependencies in `requirements.txt` are locked to versions
that only ship wheels for Python 3.10 (e.g. `torch==2.5.1`,
`torchvision==0.20.1`). If you regenerate `requirements.txt`, keep Python 3.10
or bump every dependency together — otherwise the Space build fails with
`No matching distribution found`. Do **not** re-export the requirements with
`--hash`: hashes put pip in `--require-hashes` mode, which conflicts with the
extra packages the Hugging Face builder injects and breaks the build.
**Groq model** is set via `groq_model_name` in `spinoza_project/config.yaml`.
Groq regularly retires model IDs, so the app checks the live Groq catalog at
startup and falls back to `llama-3.3-70b-versatile` if the configured model is
gone (see `resolve_groq_model` in `spinoza_project/source/backend/llm_utils.py`).
Check the current catalog at https://console.groq.com/docs/models before changing it.
## Contributing
1. Clone the repository.
2. Create a new branch: `git checkout -b feature-name`.
3. Make your changes.
4. Push your branch: `git push origin feature-name`.
5. Create a pull request.
## License
WIP
|