| title | ASD Multi-Agent Web Game | ||||
|---|---|---|---|---|---|
| emoji | 🧠 | ||||
| colorFrom | blue | ||||
| colorTo | purple | ||||
| sdk | docker | ||||
| app_port | 8501 | ||||
| tags |
|
||||
| pinned | false | ||||
| short_description | Multi-agent system for autism children |
This is an agent-assisted system designed specifically for children with autism, providing personalized interactive experiences for children with autism through a multi-agent framework combined with eye-tracking technology.
-
Multi-Agent Framework (
multi_agent_framework.py)- Coordinates perception, decision, and action agents
- Processes user input and generates responses
-
Perception Agent (
perception_agent.py)- Analyzes user input and context
- Extracts key information and emotional states
-
Decision Agent (
decision_agent.py)- Makes decisions based on perception results
- Selects the most suitable interaction strategy
-
Action Agent (
action_agent.py)- Executes decisions and generates responses
- Creates HTML content and interactive elements
-
Eye-Tracking Module (
gaze_tracking/)- Real-time eye movement tracking
- Provides attention analysis functionality
-
Web Interface (
app.py)- Streamlit-based user interface
- Provides intuitive interactive experience
- Intelligent Dialogue: Multi-turn dialogue system based on LangChain
- Eye Tracking: Real-time monitoring of user attention status
- Personalized Response: Adjusts interaction strategies based on user status
- Web Interface: User-friendly interface design
- Multi-Agent Collaboration: Three-layer architecture of perception-decision-action
- Real-time Processing: Supports real-time eye movement data analysis and response
- Scalability: Modular design for easy feature expansion
- Python 3.8+
- Camera device (for eye tracking)
- Stable internet connection
- Access Application: Directly visit [Hugging Face Spaces Link]
- No Installation Required: Application is already running in the cloud, ready to use
- Environment Variables: Configure
OPENAI_API_KEYin Spaces settings
-
Clone Project
git clone [project address] cd ASD_agent -
Install Dependencies
pip install -r requirements.txt
-
Configure Environment Variables Copy environment variable template and configure:
cp env.example .env
Then edit the
.envfile and enter your actual API key:OPENAI_API_KEY=your OpenAI API key -
Run Application
streamlit run app.py
-
Build Image
docker build -t asd-agent . -
Run Container
docker run -p 8501:8501 -e OPENAI_API_KEY=your_key asd-agent
- Start Application: After running the above commands, the browser will automatically open the application interface
- Camera Authorization: First-time use requires allowing camera access permissions
- Start Interaction: Enter content in the text box, and the system will generate responses through the multi-agent framework
- Eye Tracking: The system will automatically analyze the user's attention status
- numpy (>=1.22.0): Numerical computation and array operations
- opencv-python (>=4.2.0.32): Computer vision and image processing
- dlib (>=19.16.0): Face detection and feature point recognition
- streamlit (>=1.28.0): Web application development framework
- langchain (>=0.1.0): Large language model application framework
- langchain-openai (>=0.0.5): OpenAI model integration
- python-dotenv (>=1.0.0): Environment variable management
- websockets (>=11.0.0): WebSocket communication
ASD_agent/
├── app.py # Main application entry (Streamlit app)
├── multi_agent_framework.py # Multi-agent framework
├── perception_agent.py # Perception agent
├── decision_agent.py # Decision agent
├── action_agent.py # Action agent
├── example.py # Example code
├── test.py # Test code
├── requirements.txt # Dependency library list
├── Dockerfile # Docker configuration file
├── gaze_tracking/ # Eye-tracking module
│ ├── __init__.py
│ ├── gaze_tracking.py # Main tracking class
│ ├── eye.py # Eye detection
│ ├── pupil.py # Pupil detection
│ ├── calibration.py # Calibration functionality
│ └── trained_models/ # Pre-trained models
└── README.md # Project description
- All Python files contain detailed comments
- Use type hints to improve code readability
- Follow PEP 8 coding standards
- Add new agents: Implement agent logic in corresponding files
- Modify interface: Edit Streamlit components in
app.py - Optimize eye tracking: Adjust parameters in the
gaze_tracking/module
This project is configured to run directly on Hugging Face Spaces:
- SDK: Docker
- Port: 8501
- Framework: Streamlit
- Tags: streamlit, ai, healthcare, autism
In Hugging Face Spaces, you need to configure the following environment variables on the Settings page:
OPENAI_API_KEY: Your OpenAI API key
- Ensure the API key is valid and has sufficient quota
- Camera functionality may be limited in cloud environments
- It's recommended to test eye-tracking functionality in a local environment
- Never commit
.envfiles containing real API keys to Git repositories - Ensure
.envfiles are added to.gitignore - In Hugging Face Spaces, configure environment variables through the Settings page
- If API keys are accidentally leaked, regenerate them immediately
-
Camera Cannot Access
- Check browser permission settings
- Ensure camera is not occupied by other applications
-
Dependency Installation Failed
- Ensure Python version compatibility
- Try using a virtual environment
-
API Call Failed
- Check if OpenAI API key is correct
- Confirm network connection is normal
- Adjust eye-tracking parameters to improve accuracy
- Optimize multi-agent response speed
- Adjust image processing parameters based on hardware configuration
Welcome to submit Issues and Pull Requests to improve the project. Before submitting code, please ensure:
- Code passes all tests
- Add necessary documentation and comments
- Follow project coding standards
This project is licensed under the MIT License. See LICENSE file for details.
For questions or suggestions, please contact through:
- Submit GitHub Issue
- Send email to project maintainer
Note: This project is designed specifically for children with autism. Please ensure it is used under professional guidance and adjust interaction strategies according to specific needs.