Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,3 +12,249 @@ short_description: "EduTutor AI application\_files"
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 15 |
+
# 🎓 EduTutor AI - Complete Learning Platform
|
| 16 |
+
|
| 17 |
+
**An advanced AI-powered educational platform that provides personalized tutoring, homework analysis, interactive quizzes, and comprehensive progress tracking.**
|
| 18 |
+
|
| 19 |
+
## ✨ Features
|
| 20 |
+
|
| 21 |
+
### 🤖 AI Chat Tutor
|
| 22 |
+
- **Intelligent Responses**: Powered by IBM Granite 3.3 2B Instruct model with GPT-2 fallback
|
| 23 |
+
- **Multi-Subject Support**: Mathematics, Physics, Chemistry, Biology, and General topics
|
| 24 |
+
- **Difficulty Levels**: Beginner, Intermediate, and Advanced content
|
| 25 |
+
- **Math Problem Solving**: Automatic detection and step-by-step solutions for algebraic equations
|
| 26 |
+
|
| 27 |
+
### 📊 Advanced Homework Analyzer
|
| 28 |
+
- **Multi-Problem Detection**: Automatically identifies and separates individual problems
|
| 29 |
+
- **Comprehensive Solutions**: Detailed step-by-step solutions with explanations
|
| 30 |
+
- **Subject-Specific Analysis**: Tailored approaches for different academic subjects
|
| 31 |
+
- **Performance Assessment**: Grading estimates and improvement recommendations
|
| 32 |
+
|
| 33 |
+
### 📝 Interactive Quiz System
|
| 34 |
+
- **Dynamic Question Generation**: Creates subject-specific quizzes on any topic
|
| 35 |
+
- **Immediate Feedback**: Detailed explanations for each answer
|
| 36 |
+
- **Performance Tracking**: Automatic score calculation and analysis
|
| 37 |
+
- **Customizable Length**: 3-10 questions per quiz
|
| 38 |
+
|
| 39 |
+
### 📋 Study Plan Generator
|
| 40 |
+
- **Personalized Learning Paths**: Custom study plans based on topic and duration
|
| 41 |
+
- **Structured Modules**: Organized learning with time estimates and difficulty levels
|
| 42 |
+
- **Essential Terminology**: Key terms and definitions for each subject
|
| 43 |
+
- **Progress Milestones**: Clear goals and assessment points
|
| 44 |
+
|
| 45 |
+
### 📈 Progress Tracking
|
| 46 |
+
- **Comprehensive Analytics**: Detailed performance reports and trends
|
| 47 |
+
- **Multi-Student Support**: Track progress for multiple learners
|
| 48 |
+
- **Achievement System**: Badges and milestones for motivation
|
| 49 |
+
- **Learning Insights**: Personalized recommendations based on performance data
|
| 50 |
+
|
| 51 |
+
## 🚀 Quick Start
|
| 52 |
+
|
| 53 |
+
### Prerequisites
|
| 54 |
+
- Python 3.8 or higher
|
| 55 |
+
- CUDA-compatible GPU (optional, for better performance)
|
| 56 |
+
- Hugging Face account (optional, for access to more models)
|
| 57 |
+
|
| 58 |
+
### Installation
|
| 59 |
+
|
| 60 |
+
1. **Clone or download the application files**
|
| 61 |
+
\`\`\`bash
|
| 62 |
+
# Ensure you have app.py in your working directory
|
| 63 |
+
\`\`\`
|
| 64 |
+
|
| 65 |
+
2. **Install dependencies**
|
| 66 |
+
\`\`\`bash
|
| 67 |
+
pip install -r requirements.txt
|
| 68 |
+
\`\`\`
|
| 69 |
+
|
| 70 |
+
3. **Set up Hugging Face token (optional)**
|
| 71 |
+
- Create a Hugging Face account at https://huggingface.co
|
| 72 |
+
- Generate an access token
|
| 73 |
+
- Set it as an environment variable or add to Google Colab secrets:
|
| 74 |
+
\`\`\`bash
|
| 75 |
+
export HF_TOKEN="your_token_here"
|
| 76 |
+
\`\`\`
|
| 77 |
+
|
| 78 |
+
4. **Run the application**
|
| 79 |
+
\`\`\`bash
|
| 80 |
+
python app.py
|
| 81 |
+
\`\`\`
|
| 82 |
+
|
| 83 |
+
5. **Access the web interface**
|
| 84 |
+
- Open your browser and go to `http://localhost:7860`
|
| 85 |
+
- The application will also provide a public Gradio link for sharing
|
| 86 |
+
|
| 87 |
+
## 🎯 How to Use
|
| 88 |
+
|
| 89 |
+
### AI Chat Tutor
|
| 90 |
+
1. Select your subject and difficulty level
|
| 91 |
+
2. Type your question in the chat input
|
| 92 |
+
3. Get instant, detailed responses with explanations
|
| 93 |
+
4. Ask follow-up questions for deeper understanding
|
| 94 |
+
|
| 95 |
+
**Example Questions:**
|
| 96 |
+
- "Solve 2x + 5 = 15"
|
| 97 |
+
- "What is photosynthesis?"
|
| 98 |
+
- "Explain Newton's first law"
|
| 99 |
+
- "How do I factor x² - 5x + 6?"
|
| 100 |
+
|
| 101 |
+
### Homework Analyzer
|
| 102 |
+
1. Select the subject of your homework
|
| 103 |
+
2. Paste your homework problems in the text area
|
| 104 |
+
3. Click "Analyze Homework" for comprehensive solutions
|
| 105 |
+
4. Review detailed explanations and study recommendations
|
| 106 |
+
|
| 107 |
+
### Interactive Quizzes
|
| 108 |
+
1. Enter a topic and select subject
|
| 109 |
+
2. Choose the number of questions (3-10)
|
| 110 |
+
3. Answer all questions using the radio buttons
|
| 111 |
+
4. Submit to see results with explanations
|
| 112 |
+
|
| 113 |
+
### Study Plans
|
| 114 |
+
1. Enter the topic you want to study
|
| 115 |
+
2. Select subject and study duration
|
| 116 |
+
3. Get a personalized learning roadmap with:
|
| 117 |
+
- Structured modules and timelines
|
| 118 |
+
- Key concepts and terminology
|
| 119 |
+
- Study tips and resources
|
| 120 |
+
|
| 121 |
+
### Progress Tracking
|
| 122 |
+
1. **Add Progress**: Record completed activities with scores
|
| 123 |
+
2. **View Reports**: Generate comprehensive progress analytics
|
| 124 |
+
3. **Track Trends**: Monitor improvement over time
|
| 125 |
+
4. **Get Recommendations**: Receive personalized study advice
|
| 126 |
+
|
| 127 |
+
## 🧠 AI Models and Technology
|
| 128 |
+
|
| 129 |
+
### Primary Model
|
| 130 |
+
- **IBM Granite 3.3 2B Instruct**: Advanced language model optimized for educational content
|
| 131 |
+
- **Automatic Fallback**: GPT-2 model ensures reliability if primary model fails
|
| 132 |
+
- **GPU Acceleration**: CUDA support for faster response times
|
| 133 |
+
|
| 134 |
+
### Knowledge Base
|
| 135 |
+
- **Curated Content**: Expert-verified information across multiple subjects
|
| 136 |
+
- **Structured Learning**: Organized concepts with definitions and applications
|
| 137 |
+
- **Real-World Connections**: Practical applications and examples
|
| 138 |
+
|
| 139 |
+
### Math Solver
|
| 140 |
+
- **Algebraic Equations**: Step-by-step solutions with verification
|
| 141 |
+
- **Arithmetic Operations**: Order of operations and detailed calculations
|
| 142 |
+
- **Error Handling**: Helpful guidance when problems can't be solved automatically
|
| 143 |
+
|
| 144 |
+
## 📚 Supported Subjects
|
| 145 |
+
|
| 146 |
+
### Mathematics
|
| 147 |
+
- Algebra (linear equations, quadratics, systems)
|
| 148 |
+
- Geometry (shapes, area, volume)
|
| 149 |
+
- Calculus (derivatives, integrals, limits)
|
| 150 |
+
- Statistics (data analysis, probability)
|
| 151 |
+
|
| 152 |
+
### Physics
|
| 153 |
+
- Mechanics (motion, forces, energy)
|
| 154 |
+
- Thermodynamics (heat, temperature, entropy)
|
| 155 |
+
- Electromagnetism (electric and magnetic fields)
|
| 156 |
+
- Waves (sound, light, frequency)
|
| 157 |
+
|
| 158 |
+
### Chemistry
|
| 159 |
+
- Organic Chemistry (carbon compounds, reactions)
|
| 160 |
+
- Inorganic Chemistry (metals, salts, acids/bases)
|
| 161 |
+
- Chemical Bonding (ionic, covalent, molecular)
|
| 162 |
+
|
| 163 |
+
### Biology
|
| 164 |
+
- Cell Biology (organelles, processes)
|
| 165 |
+
- Genetics (DNA, inheritance, mutations)
|
| 166 |
+
- Photosynthesis and Respiration
|
| 167 |
+
- Ecology and Evolution
|
| 168 |
+
|
| 169 |
+
## 🔧 Configuration
|
| 170 |
+
|
| 171 |
+
### Environment Variables
|
| 172 |
+
- `HF_TOKEN`: Hugging Face API token for model access
|
| 173 |
+
- `CUDA_VISIBLE_DEVICES`: GPU selection for CUDA acceleration
|
| 174 |
+
|
| 175 |
+
### Model Configuration
|
| 176 |
+
The application automatically detects available hardware and configures models accordingly:
|
| 177 |
+
- **GPU Available**: Uses CUDA acceleration with float16 precision
|
| 178 |
+
- **CPU Only**: Falls back to CPU processing with float32 precision
|
| 179 |
+
|
| 180 |
+
## 📊 Performance and Scalability
|
| 181 |
+
|
| 182 |
+
### System Requirements
|
| 183 |
+
- **Minimum**: 4GB RAM, 2GB storage
|
| 184 |
+
- **Recommended**: 8GB RAM, 4GB storage, CUDA-compatible GPU
|
| 185 |
+
- **Optimal**: 16GB RAM, 8GB storage, modern GPU (RTX 3060 or better)
|
| 186 |
+
|
| 187 |
+
### Response Times
|
| 188 |
+
- **With GPU**: 1-3 seconds for most queries
|
| 189 |
+
- **CPU Only**: 5-15 seconds depending on complexity
|
| 190 |
+
- **Simple Math**: Near-instantaneous regardless of hardware
|
| 191 |
+
|
| 192 |
+
## 🛠️ Troubleshooting
|
| 193 |
+
|
| 194 |
+
### Common Issues
|
| 195 |
+
|
| 196 |
+
**Model Loading Fails**
|
| 197 |
+
- Check internet connection for model download
|
| 198 |
+
- Verify sufficient disk space (2-4GB required)
|
| 199 |
+
- Try running with CPU-only mode
|
| 200 |
+
|
| 201 |
+
**Slow Performance**
|
| 202 |
+
- Enable GPU acceleration if available
|
| 203 |
+
- Reduce concurrent users
|
| 204 |
+
- Consider using lighter models for deployment
|
| 205 |
+
|
| 206 |
+
**Quiz/Progress Features Not Working**
|
| 207 |
+
- Ensure all form fields are filled correctly
|
| 208 |
+
- Check that scores are between 0-100
|
| 209 |
+
- Verify student names don't contain special characters
|
| 210 |
+
|
| 211 |
+
### Getting Help
|
| 212 |
+
- Check the console output for detailed error messages
|
| 213 |
+
- Ensure all dependencies are installed correctly
|
| 214 |
+
- Try restarting the application if issues persist
|
| 215 |
+
|
| 216 |
+
## 🤝 Contributing
|
| 217 |
+
|
| 218 |
+
This educational platform is designed to be extensible and customizable:
|
| 219 |
+
|
| 220 |
+
### Adding New Subjects
|
| 221 |
+
1. Extend the `KnowledgeBase` class with new subject data
|
| 222 |
+
2. Add subject-specific question templates for quizzes
|
| 223 |
+
3. Update the Gradio interface dropdown options
|
| 224 |
+
|
| 225 |
+
### Improving AI Responses
|
| 226 |
+
1. Enhance the knowledge base with more detailed content
|
| 227 |
+
2. Add new prompt templates for different question types
|
| 228 |
+
3. Implement additional fallback response strategies
|
| 229 |
+
|
| 230 |
+
### Adding Features
|
| 231 |
+
1. Create new methods in the `EducationalFeatures` class
|
| 232 |
+
2. Add corresponding Gradio interface components
|
| 233 |
+
3. Update the main application class to integrate new features
|
| 234 |
+
|
| 235 |
+
## 📄 License
|
| 236 |
+
|
| 237 |
+
This project is designed for educational purposes. Please ensure compliance with:
|
| 238 |
+
- Hugging Face model licenses
|
| 239 |
+
- Gradio usage terms
|
| 240 |
+
- Educational fair use guidelines
|
| 241 |
+
|
| 242 |
+
## 🙏 Acknowledgments
|
| 243 |
+
|
| 244 |
+
- **Hugging Face**: For providing the transformer models and libraries
|
| 245 |
+
- **Gradio**: For the excellent web interface framework
|
| 246 |
+
- **IBM**: For the Granite model series
|
| 247 |
+
- **SymPy**: For mathematical computation capabilities
|
| 248 |
+
- **PyTorch**: For deep learning infrastructure
|
| 249 |
+
|
| 250 |
+
## 📞 Support
|
| 251 |
+
|
| 252 |
+
For technical support or questions:
|
| 253 |
+
1. Check the troubleshooting section above
|
| 254 |
+
2. Review the console output for error details
|
| 255 |
+
3. Ensure all requirements are properly installed
|
| 256 |
+
4. Consider hardware limitations for performance issues
|
| 257 |
+
|
| 258 |
+
---
|
| 259 |
+
|
| 260 |
+
**EduTutor AI - Empowering Education Through Artificial Intelligence** 🎓✨
|