Spaces:
Paused
Paused
Commit ·
be5ff50
1
Parent(s): e3ac2ea
edit readme
Browse files- .gitignore +1 -0
- README.md +8 -44
.gitignore
CHANGED
|
@@ -12,6 +12,7 @@ alembic.ini
|
|
| 12 |
*.log
|
| 13 |
.DS_Store
|
| 14 |
|
|
|
|
| 15 |
*.h5
|
| 16 |
*.keras
|
| 17 |
*.tflite
|
|
|
|
| 12 |
*.log
|
| 13 |
.DS_Store
|
| 14 |
|
| 15 |
+
# Models
|
| 16 |
*.h5
|
| 17 |
*.keras
|
| 18 |
*.tflite
|
README.md
CHANGED
|
@@ -1,44 +1,8 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
* **AI Model Serving:** Integrates multiple TensorFlow/Keras `.keras` models for predicting age, gender, hair color, hair style, eyebrows, skin type, and beard presence.
|
| 10 |
-
* **Concurrent Predictions:** Employs `ThreadPoolExecutor` and `asyncio.gather` to run multiple models simultaneously for faster response times.
|
| 11 |
-
* **Database Migrations:** Managed via Alembic.
|
| 12 |
-
* **Interactive API Documentation:** Provided by Scalar.
|
| 13 |
-
|
| 14 |
-
## 🛠️ Technology Stack
|
| 15 |
-
|
| 16 |
-
* **Python:** 3.10+ (Recommended 3.13)
|
| 17 |
-
* **Framework:** FastAPI
|
| 18 |
-
* **Package Manager:** uv
|
| 19 |
-
* **Database:** PostgreSQL
|
| 20 |
-
* **Database Driver:** asyncpg
|
| 21 |
-
* **ORM:** SQLAlchemy (Async)
|
| 22 |
-
* **Migration:** Alembic
|
| 23 |
-
* **Data Validation:** Pydantic
|
| 24 |
-
* **ASGI Server:** Uvicorn
|
| 25 |
-
* **Machine Learning:** TensorFlow / Keras
|
| 26 |
-
|
| 27 |
-
## 📂 Project Structure
|
| 28 |
-
|
| 29 |
-
```plaintext
|
| 30 |
-
backend-project/
|
| 31 |
-
├── alembic/ # โฟลเดอร์ที่ Auto Generate มาจาก Alembic
|
| 32 |
-
├── app/ # โฟลเดอร์หลักเก็บ Source Code
|
| 33 |
-
│ ├── api/ # API Routers and endpoints
|
| 34 |
-
│ ├── core/ # การตั้งค่าหลัก (เช่น config.py โหลด .env)
|
| 35 |
-
│ ├── db/ # Database session (Engine, SessionLocal)
|
| 36 |
-
│ ├── models/ # SQLAlchemy database models
|
| 37 |
-
│ ├── schemas/ # Pydantic models (Request/Response validation)
|
| 38 |
-
│ └── services/ # Business logic และ AI Prediction Service
|
| 39 |
-
├── app/machine_models/ # โฟลเดอร์เก็บไฟล์โมเดล AI (.keras) - **ห้ามเอาขึ้น Git**
|
| 40 |
-
├── alembic.ini # Alembic configuration
|
| 41 |
-
├── .env # ตัวแปรระบบ (Database URL, Secret Keys)
|
| 42 |
-
├── .gitignore # ไฟล์ที่ไม่ต้องการเอาขึ้น Git
|
| 43 |
-
├── pyproject.toml # ไฟล์จัดการ Package ของ uv
|
| 44 |
-
└── main.py # จุดเริ่มต้นของโปรแกรม (Entry Point)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Backend Project
|
| 3 |
+
emoji: 🚀
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|