Spaces:
Runtime error
Runtime error
Download dependencies.py from cuiconnect/backend: direct link, hf CLI and curl.
- Browser
- Download file 439 Bytes
-
https://huggingface.co/spaces/cuiconnect/backend/resolve/main/dependencies.py
- Command line
-
hf download hf://spaces/cuiconnect/backend/dependencies.py
-
curl -L -o dependencies.py https://huggingface.co/spaces/cuiconnect/backend/resolve/main/dependencies.py
439 Bytes
| from typing import Annotated | |
| from fastapi import Depends, Request | |
| from chatbot import Comsatsbot | |
| from security import get_current_admin_id, get_current_user_id | |
| def get_chatbot(request: Request) -> Comsatsbot: | |
| return request.app.state.chatbot | |
| ChatbotDep = Annotated[Comsatsbot, Depends(get_chatbot)] | |
| CurrentUserIdDep = Annotated[str, Depends(get_current_user_id)] | |
| CurrentAdminIdDep = Annotated[str, Depends(get_current_admin_id)] |