moein99 commited on
Commit
39d8c7a
·
1 Parent(s): 8f51ef2

Add Hugging Face space config

Browse files
Files changed (1) hide show
  1. README.md +21 -122
README.md CHANGED
@@ -1,135 +1,34 @@
1
- <<<<<<< HEAD
2
  ---
3
- title: Echo Pilot
4
- =======
5
- <<<<<<< HEAD
6
- ---
7
- title: EchoPilot
8
- >>>>>>> 3e784b6 (init commit)
9
- emoji: 🚀
10
- colorFrom: red
11
  colorTo: red
12
- sdk: docker
13
- app_port: 8501
14
- tags:
15
- - streamlit
16
  pinned: false
17
- <<<<<<< HEAD
18
- short_description: Echo-Pilot space
19
- =======
20
- short_description: The Echocardiography Agent Framework
21
- >>>>>>> 3e784b6 (init commit)
22
- license: mit
23
  ---
24
 
25
- # Welcome to Streamlit!
26
-
27
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
28
-
29
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
30
- forums](https://discuss.streamlit.io).
31
- <<<<<<< HEAD
32
- =======
33
- =======
34
- # EchoPilot Agent
35
-
36
- An echocardiography ReAct agent focusing on EchoPilot’s specialised tools.
37
 
38
- ## Project Structure
39
 
 
 
 
 
40
 
41
- ```
42
- echo-agent/
43
- ├── agents/ # Agent implementations
44
- │ ├── intelligent_agent.py # ReAct loop with tool calling
45
- │ └── react_agent.py # LangGraph workflow wrapper
46
- ├── assets/ # Static assets and data files
47
- ├── configs/ # Configuration files
48
- ├── docs/ # Documentation
49
- ├── model_weights/ # Pre-trained weights
50
- ├── models/ # Model wrappers and factory
51
- ├── outputs/ # Generated outputs
52
- ├── scripts/ # Utility scripts
53
- ├── temp/ # Temporary files
54
- ├── tests/ # Test suite
55
- ├── tool_repos/ # External tool repositories
56
- │ ├── MedSAM2-main
57
- │ └── EchoFlow
58
- ├── tools/ # Tool implementations
59
- ├── utils/ # Utility helpers
60
- ├── config.py # Main configuration
61
- ├── main.py # CLI entry point
62
- ├── README.md # Project documentation
63
- ├── requirements.txt # Python dependencies
64
- ├── setup.py # Package setup
65
- └── streamlit_app.py # Streamlit web interface
66
- ```
67
-
68
- ## 🚀 Quick Start
69
 
70
- ### 1. Launch the Streamlit interface
71
  ```bash
 
72
  streamlit run streamlit_app.py
73
  ```
74
 
75
- ### 2. Run the CLI agent
76
- ```bash
77
- python -m echo-agent.main --video path/to/video.mp4 --query "Assess LV systolic function."
78
- ```
79
-
80
- ### 3. Run Comprehensive Tests
81
- ```bash
82
- python tests/test_all_tools_comprehensive.py
83
- ```
84
-
85
- ## 🔧 Key Components
86
-
87
- ### Query Analyzer System
88
- - **API Server**: REST API for intelligent tool selection
89
- - **Client Library**: Python client with fallback support
90
- - **Hybrid Analyzer**: Automatic API/local switching
91
-
92
- ### AI Models
93
- - **PanEcho**: Cardiac disease prediction (40 tasks)
94
- - **MedSAM2**: Medical image segmentation
95
- - **EchoFlow**: Video generation and analysis
96
- - **EchoPrime**: Advanced echocardiogram analysis
97
-
98
- ### Web Interfaces
99
- - **Streamlit**: Primary web interface with progress tracking
100
-
101
-
102
- ### Tools
103
- - **Echo Segmentation**: Cardiac structure segmentation
104
- - **Disease Prediction**: Comprehensive cardiac analysis
105
- - **View Classification**: Echocardiogram view identification
106
- - **Measurement Prediction**: Cardiac measurements
107
- - **Report Generation**: Clinical report creation
108
- - **Video Generation**: Synthetic echocardiogram creation
109
-
110
- ## 🛠️ Development
111
-
112
- ### Adding New Tools
113
- 1. Implement tool in `tools/` directory
114
- 2. Ensure the tool name and description appear in `agents/intelligent_agent.py` prompt if needed
115
- 3. Update web interfaces or CLI helpers if surfacing new outputs
116
- 4. Add tests
117
-
118
- ### Adding New Models
119
- 1. Implement model in `models/` directory
120
- 2. Add to `model_factory.py`
121
- 3. Update tool implementations
122
- 4. Add configuration files
123
-
124
-
125
- ## 📝 Configuration
126
-
127
- All configuration is managed through:
128
- - `config.py`: Main configuration
129
- - `configs/`: Model-specific configurations
130
- - Environment variables for deployment
131
-
132
-
133
-
134
- >>>>>>> 94e3313 (Initial EchoPilot Space)
135
- >>>>>>> 3e784b6 (init commit)
 
 
1
  ---
2
+ title: Echo (Private EchoPilot Agent)
3
+ emoji: 🫀
4
+ colorFrom: blue
 
 
 
 
 
5
  colorTo: red
6
+ sdk: streamlit
7
+ sdk_version: "1.39.0"
8
+ app_file: app.py
 
9
  pinned: false
10
+ private: true
 
 
 
 
 
11
  ---
12
 
13
+ # EchoPilot Private Echocardiography Agent
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ This Hugging Face Space runs the EchoPilot Streamlit interface for cardiac ultrasound analysis (segmentation, measurements, disease prediction, view classification, reporting, and video generation).
16
 
17
+ ## Usage
18
+ 1. Open the Space (private link only).
19
+ 2. Provide the echo video path and clinical question.
20
+ 3. The ReAct agent orchestrates the available tools and responds with a structured summary.
21
 
22
+ ## Secrets & Config
23
+ Configure the following in **Settings → Variables and secrets**:
24
+ - `OPENAI_API_KEY`
25
+ - `ECHO_INITIAL_MASK_PATH` (default mask prompt, optional)
26
+ - Any other environment variables from `config.py`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
+ ## Local Development
29
  ```bash
30
+ pip install -r requirements.txt
31
  streamlit run streamlit_app.py
32
  ```
33
 
34
+ Please keep PHI and large datasets out of this Space; only the runnable code and lightweight assets are included. Weight files download at runtime or reside in the bundled `tool_repos/` directories.