Skip to content

A Python package for GPT-related functionalities in FertiScan | Un package Python pour les fonctionnalités liées à GPT dans FertiScan

License

Notifications You must be signed in to change notification settings

ai-cfia/fertiscan-pipeline

Repository files navigation

FertiScan Pipeline

(Le français est disponible au bas de la page)

This repository contains the core analysis pipeline for FertiScan. It is designed to be used as a standalone Python package that can be integrated with other projects, such as the fertiscan-backend.

Setup for Development

Prerequisites

  • Python 3.8+
  • pip
  • virtualenv
  • Azure Document Intelligence and OpenAI API keys

Installation

To install the package directly from GitHub:

Direct Installation using pip

Run the following command in your terminal:

pip install git+https://github.com/ai-cfia/fertiscan-pipeline.git@main

Installation via requirements.txt

Add the following line to your requirements.txt file:

git+https://github.com/ai-cfia/fertiscan-pipeline.git@main

Then, install the dependencies with:

pip install -r requirements.txt

Environment Variables

Create a .env file and set the necessary environment variables:

AZURE_API_ENDPOINT=your_azure_form_recognizer_endpoint
AZURE_API_KEY=your_azure_form_recognizer_key
AZURE_OPENAI_API_ENDPOINT=your_azure_openai_endpoint
AZURE_OPENAI_API_KEY=your_azure_openai_key
AZURE_OPENAI_DEPLOYMENT=your_azure_openai_deployment

Packaging and release workflow

The pipeline triggers on PRs to check code quality, markdown, repository standards, and ensures that the version in pyproject.toml is bumped. When a PR is merged, the workflow automatically creates a release based on the version in pyproject.toml. The latest releases and changelogs are available here.

To use this package in other projects, add it to your requirements.txt (e.g., in the fertiscan-backend):

git+https://github.com/ai-cfia/[email protected]

Where vX.X.X is the version from the release page.


FertiScan Pipeline (FR)

Ce dépôt contient le pipeline d'analyse principal pour FertiScan. Il est conçu pour être utilisé comme un package Python autonome qui peut être intégré à d'autres projets, tels que fertiscan-backend.

Configuration pour le développement

Prérequis

  • Python 3.8+
  • pip
  • virtualenv
  • Clés API pour Azure Document Intelligence et OpenAI

Installation via GitHub

Pour installer le package directement via GitHub :

Installation directe avec pip

Exécutez la commande suivante dans votre terminal :

pip install git+https://github.com/ai-cfia/fertiscan-pipeline.git@main

Installation avec requirements.txt

Ajoutez la ligne suivante à votre fichier requirements.txt :

git+https://github.com/ai-cfia/fertiscan-pipeline.git@main

Ensuite, installez les dépendances avec :

pip install -r requirements.txt

Variables d'environnement

Créez un fichier .env et configurez les variables d'environnement nécessaires :

AZURE_API_ENDPOINT=your_azure_form_recognizer_endpoint
AZURE_API_KEY=your_azure_form_recognizer_key
AZURE_OPENAI_API_ENDPOINT=your_azure_openai_endpoint
AZURE_OPENAI_API_KEY=your_azure_openai_key
AZURE_OPENAI_DEPLOYMENT=your_azure_openai_deployment

Workflow de packaging et de publication

Le pipeline se déclenche sur les Pull Requests pour vérifier la qualité du code, les fichiers markdown, les normes du dépôt et s'assurer que la version dans pyproject.toml est mise à jour. Lorsqu'une PR est fusionnée, le workflow crée automatiquement une version basée sur la version dans pyproject.toml. Les dernières versions et journaux des modifications sont disponibles ici.

Pour utiliser ce package dans d'autres projets, ajoutez-le à votre requirements.txt (par exemple, dans fertiscan-backend) :

git+https://github.com/ai-cfia/[email protected]

vX.X.X est la version provenant de la page des versions.

About

A Python package for GPT-related functionalities in FertiScan | Un package Python pour les fonctionnalités liées à GPT dans FertiScan

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages