Skip to content

8. Call Azure OpenAI Batch API with Streamlit

This app demonstrates how to call Azure OpenAI Batch API with Streamlit.

Prerequisites

Usage

  1. Get Azure OpenAI Service 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/8_streamlit_azure_openai_batch/main.py

Example

Streamlit Chat

References