Skip to content

9. Call Azure Document Intelligence API with Streamlit

This Streamlit app demonstrates how to call Azure Document Intelligence API with Streamlit.

Prerequisites

  • Python 3.10 or later
  • Azure Document Intelligence API key

Usage

  1. Get Azure Document Intelligence API key
  2. Copy .env.template to .env in the same directory
  3. Set credentials in .env
  4. Run main.py
# Create a virtual environment
$ python -m venv .venv

# Activate the virtual environment
$ source .venv/bin/activate

# Install dependencies
$ pip install -r requirements.txt

# Run the script
$ python -m streamlit run apps/9_streamlit_azure_document_intelligence/main.py

Example

Streamlit Chat

References