Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -97,6 +97,21 @@ class TranslateResponse(BaseModel):
|
|
| 97 |
low_confidence: bool
|
| 98 |
|
| 99 |
# ─── Endpoints ────────────────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
@app.get("/health")
|
| 101 |
def health():
|
| 102 |
return {"status": "ok", "device": DEVICE, "model": ADAPTER}
|
|
|
|
| 97 |
low_confidence: bool
|
| 98 |
|
| 99 |
# ─── Endpoints ────────────────────────────────────────────────────────────────
|
| 100 |
+
@app.get("/")
|
| 101 |
+
def root():
|
| 102 |
+
return {
|
| 103 |
+
"name": "NganaNLP v2",
|
| 104 |
+
"description": "Multilingual translation API for Portuguese and Angolan Bantu languages",
|
| 105 |
+
"message": "A language unheard is a thought untranslated. We build bridges.",
|
| 106 |
+
"languages": LANGUAGES,
|
| 107 |
+
"endpoints": {
|
| 108 |
+
"translate": "POST /translate",
|
| 109 |
+
"languages": "GET /languages",
|
| 110 |
+
"docs": "GET /docs",
|
| 111 |
+
"health": "GET /health",
|
| 112 |
+
},
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
@app.get("/health")
|
| 116 |
def health():
|
| 117 |
return {"status": "ok", "device": DEVICE, "model": ADAPTER}
|