pratham0011 commited on
Commit
12d0a26
·
verified ·
1 Parent(s): 216523d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -174
README.md CHANGED
@@ -1,174 +1,12 @@
1
- # Multi-Agent Tutoring Bot
2
-
3
- A sophisticated tutoring system built with LangChain, Ollama, and Gradio that uses specialized AI agents to help students with mathematics and physics questions.
4
-
5
- ## 🏗️ Architecture
6
-
7
- ### Main Components
8
-
9
- 1. **Tutor Agent** - Primary orchestrator that routes queries to specialist agents
10
- 2. **Math Agent** - Specialized in mathematics with calculator tool integration
11
- 3. **Physics Agent** - Specialized in physics with constants lookup tool
12
- 4. **Tools** - Calculator and physics constants database
13
-
14
- ### Agent Communication Flow
15
-
16
- ```
17
- User Query → Tutor Agent → Classification → Specialist Agent → Tool Usage → Response
18
- ```
19
-
20
- ## 🚀 Features
21
-
22
- - **Intelligent Query Routing**: Automatically determines whether a question is about math, physics, or general topics
23
- - **Specialized Agents**: Dedicated agents for mathematics and physics with domain-specific knowledge
24
- - **Tool Integration**:
25
- - Calculator tool for mathematical computations
26
- - Physics constants database for scientific calculations
27
- - **Interactive Web Interface**: User-friendly Gradio interface with conversation history
28
- - **Educational Focus**: Provides step-by-step explanations and learning support
29
-
30
- ## 📋 Prerequisites
31
-
32
- 1. **Option 1 (Docker)**: Docker and Docker Compose installed
33
- 2. **Option 2 (Local)**:
34
- - Python 3.8+
35
- - Ollama installed and running
36
- - Qwen3:0.6b model pulled in Ollama
37
-
38
- ### Install Ollama and Model (for local installation)
39
-
40
- ```bash
41
- # Install Ollama (visit https://ollama.ai for platform-specific instructions)
42
- # Pull the required model
43
- ollama pull qwen3:0.6b
44
- ```
45
-
46
- ## 🛠️ Installation
47
-
48
- ### Option 1: Using Docker Compose (Recommended)
49
-
50
- This method will set up both the tutoring bot and Ollama in separate containers:
51
-
52
- 1. **Clone or download the project**
53
- 2. **Run Docker Compose**:
54
- ```bash
55
- docker-compose up
56
- ```
57
- 3. **Open your browser** to `http://localhost:7860`
58
-
59
- ### Option 2: Using Docker with Local Ollama
60
-
61
- If you already have Ollama running locally:
62
-
63
- 1. **Ensure Ollama is running with the required model**:
64
- ```bash
65
- ollama run qwen3:0.6b
66
- ```
67
-
68
- 2. **Build and run the Docker container**:
69
- ```bash
70
- docker build -t tutoring-bot .
71
- docker run -p 7860:7860 -e OLLAMA_BASE_URL=http://host.docker.internal:11434 tutoring-bot
72
- ```
73
-
74
- 3. **Open your browser** to `http://localhost:7860`
75
-
76
- ### Option 3: Local Installation
77
-
78
- 1. **Clone or download the project**
79
- 2. **Create a virtual environment** (recommended):
80
- ```bash
81
- python -m venv venv
82
- source venv/bin/activate # On Windows: venv\Scripts\activate
83
- ```
84
-
85
- 3. **Install dependencies**:
86
- ```bash
87
- pip install -r requirements.txt
88
- ```
89
-
90
- 4. **Ensure Ollama is running**:
91
- ```bash
92
- ollama serve
93
- ```
94
-
95
- ## 🎮 Usage
96
-
97
- 1. **Start the application** (if using local installation):
98
- ```bash
99
- python app.py
100
- ```
101
-
102
- 2. **Open your browser** to the appropriate URL (based on installation method)
103
-
104
- 3. **Ask questions** like:
105
- - "Solve 2x + 5 = 11"
106
- - "What is Newton's second law?"
107
- - "Calculate 15 × 23"
108
- - "What is the speed of light?"
109
-
110
- ## 🔧 Configuration
111
-
112
- Edit `config.py` to modify:
113
- - Ollama base URL
114
- - Model name
115
- - Physics constants database
116
- - Agent behavior parameters
117
-
118
- ## 📁 Project Structure
119
-
120
- ```
121
- Multi-Agent Tutoring Bot/
122
- ├── agents/
123
- │ ├── tutor_agent.py # Main orchestrating agent
124
- │ ├── math_agent.py # Mathematics specialist
125
- │ └── physics_agent.py # Physics specialist
126
- ├── tools/
127
- │ ├── calculator.py # Calculator tool for math
128
- │ └── physics_constants.py # Constants lookup tool
129
- ├── config.py # Configuration settings
130
- ├── app.py # Main Gradio application
131
- ├── requirements.txt # Dependencies
132
- ├── Dockerfile # Docker configuration
133
- ├── docker-compose.yml # Docker Compose configuration
134
- ├── .dockerignore # Files to exclude from Docker build
135
- └── README.md # This file
136
- ```
137
-
138
- ## 🎯 Example Interactions
139
-
140
- ### Mathematics
141
- **User**: "Solve the equation 2x + 5 = 11"
142
- **Bot**: Provides step-by-step solution with calculator verification
143
-
144
- ### Physics
145
- **User**: "What is Newton's second law?"
146
- **Bot**: Explains the law with relevant physics constants if needed
147
-
148
- ### General
149
- **User**: "Hello!"
150
- **Bot**: Friendly greeting with guidance on available help
151
-
152
- ## 🔮 Future Enhancements
153
-
154
- - Add more specialist agents (Chemistry, Biology, etc.)
155
- - Implement more sophisticated tools
156
- - Add support for image/diagram recognition
157
- - Create personalized learning paths
158
- - Add quiz and assessment features
159
-
160
- ## 🐛 Troubleshooting
161
-
162
- ### Docker Issues
163
- 1. **"Cannot connect to Docker daemon"**: Make sure Docker is running
164
- 2. **"Port already in use"**: Change the port mapping in `docker-compose.yml` or the Docker run command
165
- 3. **"Connection refused to Ollama"**: Check that the Ollama container is running and the network is properly configured
166
-
167
- ### Local Installation Issues
168
- 1. **"Connection Error"**: Ensure Ollama is running (`ollama serve`)
169
- 2. **"Model not found"**: Pull the model (`ollama pull qwen3:0.6b`)
170
- 3. **"Port already in use"**: Change the port in `app.py` or set the `SERVER_PORT` environment variable
171
-
172
- ## 📄 License
173
-
174
- This project is for educational purposes. Please ensure compliance with all relevant software licenses.
 
1
+ ---
2
+ title: Multi Agent Tutoring Bot
3
+ emoji:
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 5.31.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference