- Python 3.10+ - Make sure you have Python 3.10 or higher installed
- Poetry - For dependency management
- direnv - For environment variable management
-
Install direnv (if not already installed):
# On macOS with Homebrew brew install direnv # On Ubuntu/Debian sudo apt-get install direnv # On other systems, check: https://direnv.net/docs/installation.html
-
Install Python dependencies:
poetry install
-
Set up environment variables:
- Edit
.envrcand replace the placeholder API key with your actual Anthropic API key:
export ANTHROPIC_API_KEY="your-actual-api-key-here" export OPENAI_API_KEY="your-actual-api-key-here"
- Edit
-
Allow direnv to load the environment:
direnv allow
To run the TaskEval Streamlit application:
# Activate the Poetry environment and run Streamlit
poetry run streamlit run app.pyOr if you prefer to activate the virtual environment first:
# Activate the Poetry shell
poetry shell
# Run the Streamlit app
streamlit run app.pyThe application will start and be available at http://localhost:8501 in your web browser.
The TaskEval app provides two main evaluation tasks:
- Figure Extraction: Upload an image and provide instructions to extract data points from charts/graphs
- QA Answering: Upload a PDF document and ask questions about its content
If you encounter any issues:
-
Port already in use: If port 8501 is busy, Streamlit will automatically use the next available port (8502, 8503, etc.)
-
Environment variables not loaded: Make sure you've run
direnv allowin the project directory -
Dependencies not found: Ensure you've run
poetry installand activated the environment withpoetry shell -
API key issues: Verify your API keys are correctly set in the
.envrcfile