A Mistral Workflows project.
This project shows how to use Mistral Workflows to process documents in healthcare.
Run the following command to install the required project dependencies:
make installdepsThen copy .env.example to .env and set your MISTRAL_API_KEY.
You can optionally override the chat completion models via
MISTRAL_CLASSIFIER_MODEL and MISTRAL_EXTRACTOR_MODEL.
Use the following command to auto-discoves all workflow classes in src/workflows/, register them with AI Studio, and starts polling for executions. The task deployent name is set to your hostname:
make start-workerIn a separate terminal, start the Streamlit app to view the document extraction UI:
make streamlitUpload one of the provided PDFs and click "Start Workflow".
You can monitor your workflow's progress and view the extracted data in AI Studio.
The following command runs a load test that triggers the workflow 10 times using the provided input documents:
make load-testYou can also provide a custom amount of times to trigger the workflow:
make load-test n=5# Format
uv run ruff format .
# Lint
uv run ruff check --fix .When you're done, stop the Streamlit app and the worker using Ctrl+C.