You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.**Extraction:** Forms in PDF format are processed through an OCR engine (using [gpt-4o-mini](https://platform.openai.com/docs/models/gpt-4o-mini)) to crop text sections and extract data.
43
+
1.**Extraction:** Forms in PDF format are processed through an OCR engine (using generative AI) to crop text sections and extract data.
44
44
45
45
2.**Identification:** The engine identifies and extracts key information (tailored to DC Ballot Initiatives) related to validating signatures:
46
46
@@ -63,10 +63,14 @@ An alternate approach to get up and running is to use [Github Codespaces](https:
-[UV](https://docs.astral.sh/uv/getting-started/installation/) for building the project
68
+
- API keys for at least one of the following[^1]:
69
+
-[OpenAI API key](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key)
70
+
-[Mistral API key](https://docs.mistral.ai/getting-started/quickstart/)
71
+
-[Gemini API key](https://ai.google.dev/gemini-api/docs/api-key)
68
72
69
-
[^1]: The OpenAI free tier has a low rate limit. To increase the rate limit, you'll have to have a form payment on your OpenAI account. [See this page for details](https://platform.openai.com/docs/guides/rate-limits?tier=tier-one)
73
+
[^1]: The free tiers for these services typically have a low rate limit that can cause issues. Many services require adding a payment method to your account to increase rate limits. Please verify your account settings and usage limits before running the application.
70
74
71
75
- PDF files of ballot initiative signatures
72
76
- Use fake data in [`sample_data/fake_signed_petitions.pdf`](sample_data/fake_signed_petitions.pdf) folder to test.
@@ -86,8 +90,8 @@ cd ballot-initiative
86
90
2. Create and activate a virtual environment:
87
91
88
92
```bash
89
-
#Create virtual environment
90
-
python -m venv venv
93
+
#Initalise project and install dependencies
94
+
uv sync --all-extras --dev
91
95
92
96
# Activate virtual environment
93
97
# On Windows:
@@ -96,29 +100,20 @@ venv\Scripts\activate
96
100
source venv/bin/activate
97
101
```
98
102
99
-
3. Install dependencies:
100
-
101
-
```bash
102
-
pip install -r requirements.txt
103
-
```
104
-
105
-
4. Set up your environment:
106
-
- Create a `.env` file in the project root folder.
107
-
- Replicate the format shown in the `.env.example` file.
108
-
-[Get an OpenAI API key](https://www.howtogeek.com/885918/how-to-get-an-openai-api-key/) if you don't have one
109
-
- Add your OpenAI API key to the `.env` file:
110
-
```
111
-
OPENAI_API_KEY=<YOUR_API_KEY>
112
-
```
103
+
3. Configure and save settings:
104
+
- Make a copy of the `settings.example.toml` file and rename it to `settings.toml`.
105
+
- Add your GenAI API keys to the `api_key` field of the selected model
106
+
- Add the name of the model to the `model` field e.g. `mistral-small-latest` or `gpt-4o-mini`
0 commit comments