Spaces:
Sleeping
Sleeping
Commit ·
b527604
1
Parent(s): 6b9e563
fix: change space sdk to docker
Browse files
README.md
CHANGED
|
@@ -1,77 +1,8 @@
|
|
| 1 |
-
|
| 2 |
-
### The AI Math Agent (Google ADK & Gemini)
|
| 3 |
-
The heart of the system, powered by the **Google Agent Development Kit (ADK)** and **Gemini API**. The agent acts as an intelligent orchestrator, analyzing the user's request and deciding which specialized tool (or combination of tools) is best suited for the task.
|
| 4 |
-
|
| 5 |
-
It has access to a powerful set of tools:
|
| 6 |
-
|
| 7 |
-
* **Image Interpreter**: Takes an image of a handwritten or printed equation and converts it into a machine-readable LaTeX string.
|
| 8 |
-
* **Mathematical Vision (Gemini & Ultralytics Tools)**: Applies mathematical reasoning to visual inputs.
|
| 9 |
-
* *Quantitative Analysis (YOLO)*: For probability/statistics (e.g., counting objects).
|
| 10 |
-
* *Qualitative Analysis (Gemini)*: For interpreting graphs, charts, or geometric diagrams.
|
| 11 |
-
* **Web Data Scraper (Playwright/Selenium)**: Scrapes specific data from websites for word problems requiring real-world context (e.g., financial rates, weather data).
|
| 12 |
-
* **Problem Solver & Concept Explainer**: The core reasoning engine that performs calculations and formulates clear, step-by-step explanations.
|
| 13 |
-
* **Similar Problem Finder (Supabase VectorDB)**: Finds conceptually similar problems the user has solved in the past to aid in learning and retention.
|
| 14 |
-
|
| 15 |
-
### User Management & Data
|
| 16 |
-
* **Firebase Auth**: Secure API communication.
|
| 17 |
-
* **MongoDB**: Stores user problem history.
|
| 18 |
-
* **Scalable Backend**: **Celery** and **Redis** manage long-running AI and scraping tasks.
|
| 19 |
-
|
| 20 |
---
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
* **Web Scraping**: Playwright, Selenium
|
| 29 |
-
* **Database**: MongoDB (History), Supabase (Vector Search), Redis (Cache/Queue)
|
| 30 |
-
* **Orchestration**: Celery, Google ADK
|
| 31 |
-
* **Frontend**: Streamlit, Gradio
|
| 32 |
-
* **Deployment**: Docker, Google Cloud Run
|
| 33 |
-
|
| 34 |
-
---
|
| 35 |
-
|
| 36 |
-
## Installation & Setup
|
| 37 |
-
|
| 38 |
-
1. **Clone the repository:**
|
| 39 |
-
```bash
|
| 40 |
-
git clone https://github.com/your-username/mathminds-ai.git
|
| 41 |
-
cd mathminds-ai
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
2. **Create a virtual environment:**
|
| 45 |
-
```bash
|
| 46 |
-
python -m venv .venv
|
| 47 |
-
# Windows
|
| 48 |
-
.venv\Scripts\activate
|
| 49 |
-
# Linux/Mac
|
| 50 |
-
source .venv/bin/activate
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
3. **Install dependencies:**
|
| 54 |
-
```bash
|
| 55 |
-
pip install -r requirements.txt
|
| 56 |
-
```
|
| 57 |
-
|
| 58 |
-
4. **Configure Environment:**
|
| 59 |
-
Create a `.env` file in the root directory with the following keys:
|
| 60 |
-
```env
|
| 61 |
-
GOOGLE_API_KEY=your_key
|
| 62 |
-
REDIS_URL=redis://localhost:6379/0
|
| 63 |
-
MONGO_URI=mongodb://localhost:27017/mathminds
|
| 64 |
-
SUPABASE_URL=your_url
|
| 65 |
-
SUPABASE_KEY=your_key
|
| 66 |
-
FIREBASE_CREDENTIALS_PATH=path/to/creds.json
|
| 67 |
-
```
|
| 68 |
-
### Run the Full Stack (API + Worker)
|
| 69 |
-
**Windows:**
|
| 70 |
-
```bash
|
| 71 |
-
run_all.bat
|
| 72 |
-
```
|
| 73 |
-
|
| 74 |
-
**Docker:**
|
| 75 |
-
```bash
|
| 76 |
-
docker-compose up --build
|
| 77 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Mathminds
|
| 3 |
+
emoji: 🧠
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|