Spaces:
Running
Running
Download api/exception.py from janar/retrival_aug_llm: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/spaces/janar/retrival_aug_llm/resolve/main/api/exception.py
- Command line
-
hf download hf://spaces/janar/retrival_aug_llm/api/exception.py
-
curl -L -o exception.py https://huggingface.co/spaces/janar/retrival_aug_llm/resolve/main/api/exception.py
339 Bytes
| from fastapi import FastAPI, UploadFile, File, HTTPException, Request | |
| from fastapi.responses import JSONResponse | |
| from typing import Any, Dict | |
| async def generic_exception_handler(request: Request, exc: Exception) -> JSONResponse: | |
| return JSONResponse( | |
| status_code=500, | |
| content={"message": "Internal server error"}, | |
| ) |