Update app.py
Browse files
app.py
CHANGED
|
@@ -610,6 +610,17 @@ async def list_workers():
|
|
| 610 |
"workers": workers_info
|
| 611 |
}
|
| 612 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 613 |
if __name__ == "__main__":
|
| 614 |
import uvicorn
|
| 615 |
|
|
|
|
| 610 |
"workers": workers_info
|
| 611 |
}
|
| 612 |
|
| 613 |
+
from pydantic import BaseModel
|
| 614 |
+
|
| 615 |
+
class StatusRequest(BaseModel):
|
| 616 |
+
request_id: str
|
| 617 |
+
|
| 618 |
+
@app.post("/api/check-translation-status")
|
| 619 |
+
async def check_translation_status(request: StatusRequest):
|
| 620 |
+
request_id = request.request_id
|
| 621 |
+
return await check_status(request_id)
|
| 622 |
+
|
| 623 |
+
|
| 624 |
if __name__ == "__main__":
|
| 625 |
import uvicorn
|
| 626 |
|