File size: 2,502 Bytes
026ee5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Installation

This guide will help you install and set up DeepCritical on your system.

## Prerequisites

- Python 3.11 or higher
- `uv` package manager (recommended) or `pip`
- 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:

```bash
pip install uv
```

### 2. Clone the Repository

```bash
git clone https://github.com/DeepCritical/GradioDemo.git
cd GradioDemo
```

### 3. Install Dependencies

Using `uv` (recommended):

```bash
uv sync
```

Using `pip`:

```bash
pip install -e .
```

### 4. Install Optional Dependencies

For embeddings support (local sentence-transformers):

```bash
uv sync --extra embeddings
```

For Modal sandbox execution:

```bash
uv sync --extra modal
```

For Magentic orchestration:

```bash
uv sync --extra magentic
```

Install all extras:

```bash
uv sync --all-extras
```

### 5. Configure Environment Variables

Create a `.env` file in the project root:

```bash
# 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](../configuration/index.md) for all available options.

### 6. Verify Installation

Run the application:

```bash
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:

```bash
uv sync --all-extras --dev
```

Install pre-commit hooks:

```bash
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 `.env` file 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 sync` or `pip install -e .` again
- Check that you're in the correct virtual environment

**Port Already in Use**:
- Change the port in `src/app.py` or use environment variable
- Kill the process using port 7860

## Next Steps

- Read the [Quick Start Guide](quick-start.md)
- Learn about [MCP Integration](mcp-integration.md)
- Explore [Examples](examples.md)