Spaces:
Sleeping
Sleeping
Upload main.py
Browse files
main.py
CHANGED
|
@@ -14,7 +14,7 @@ API ini bertugas menerima gambar mata (retina/kornea) dan mendeteksi indikasi pe
|
|
| 14 |
- ✂️ **Auto Preprocessing**: Memotong area mata secara presisi dan meningkatkan kontras warna (CLAHE).
|
| 15 |
- ⚡ **Fast Inference**: Menghasilkan persentase probabilitas, status, dan rekomendasi dokter.
|
| 16 |
""",
|
| 17 |
-
version="
|
| 18 |
docs_url="/docs",
|
| 19 |
redoc_url="/redoc",
|
| 20 |
contact={
|
|
@@ -145,7 +145,7 @@ def preprocess_image(img, target_size=(240,240)):
|
|
| 145 |
# ENDPOINTS
|
| 146 |
# ===================================================================
|
| 147 |
@app.get("/api", tags=["General"], summary="Root API", description="Mengecek identitas dan versi server API saat ini.")
|
| 148 |
-
def root(): return {"message": "Cholestify EfficientNetB0 API", "version": "
|
| 149 |
|
| 150 |
@app.get("/api/health", tags=["General"], summary="Server Health Check", description="Mengecek status kesiapan server dan status *load* model AI di memori.")
|
| 151 |
def health(): return {"status": "ok", "model": "EfficientNetB0", "loaded": model is not None}
|
|
|
|
| 14 |
- ✂️ **Auto Preprocessing**: Memotong area mata secara presisi dan meningkatkan kontras warna (CLAHE).
|
| 15 |
- ⚡ **Fast Inference**: Menghasilkan persentase probabilitas, status, dan rekomendasi dokter.
|
| 16 |
""",
|
| 17 |
+
version="1.0.0",
|
| 18 |
docs_url="/docs",
|
| 19 |
redoc_url="/redoc",
|
| 20 |
contact={
|
|
|
|
| 145 |
# ENDPOINTS
|
| 146 |
# ===================================================================
|
| 147 |
@app.get("/api", tags=["General"], summary="Root API", description="Mengecek identitas dan versi server API saat ini.")
|
| 148 |
+
def root(): return {"message": "Cholestify EfficientNetB0 API", "version": "1.0.0"}
|
| 149 |
|
| 150 |
@app.get("/api/health", tags=["General"], summary="Server Health Check", description="Mengecek status kesiapan server dan status *load* model AI di memori.")
|
| 151 |
def health(): return {"status": "ok", "model": "EfficientNetB0", "loaded": model is not None}
|