Spaces:
Running
Running
Installation
This guide will help you install and set up DeepCritical on your system.
Prerequisites
- Python 3.11 or higher
uvpackage manager (recommended) orpip- At least one LLM API key (OpenAI, Anthropic, or HuggingFace)
Installation Steps
1. Install uv (Recommended)
uv is a fast Python package installer and resolver. Install it with:
pip install uv
2. Clone the Repository
git clone https://github.com/DeepCritical/GradioDemo.git
cd GradioDemo
3. Install Dependencies
Using uv (recommended):
uv sync
Using pip:
pip install -e .
4. Install Optional Dependencies
For embeddings support (local sentence-transformers):
uv sync --extra embeddings
For Modal sandbox execution:
uv sync --extra modal
For Magentic orchestration:
uv sync --extra magentic
Install all extras:
uv sync --all-extras
5. Configure Environment Variables
Create a .env file in the project root:
# Required: At least one LLM provider
LLM_PROVIDER=openai # or "anthropic" or "huggingface"
OPENAI_API_KEY=your_openai_api_key_here
# Optional: Other services
NCBI_API_KEY=your_ncbi_api_key_here # For higher PubMed rate limits
MODAL_TOKEN_ID=your_modal_token_id
MODAL_TOKEN_SECRET=your_modal_token_secret
See the Configuration Guide for all available options.
6. Verify Installation
Run the application:
uv run gradio run src/app.py
Open your browser to http://localhost:7860 to verify the installation.
Development Setup
For development, install dev dependencies:
uv sync --all-extras --dev
Install pre-commit hooks:
uv run pre-commit install
Troubleshooting
Common Issues
Import Errors:
- Ensure you've installed all required dependencies
- Check that Python 3.11+ is being used
API Key Errors:
- Verify your
.envfile is in the project root - Check that API keys are correctly formatted
- Ensure at least one LLM provider is configured
Module Not Found:
- Run
uv syncorpip install -e .again - Check that you're in the correct virtual environment
Port Already in Use:
- Change the port in
src/app.pyor use environment variable - Kill the process using port 7860
Next Steps
- Read the Quick Start Guide
- Learn about MCP Integration
- Explore Examples