issoufzousko07 zousko-stark commited on
Commit
5fbcfff
·
verified ·
1 Parent(s): 523889a

Upload folder using huggingface_hub (#6)

Browse files

- Upload folder using huggingface_hub (7f14fb6dbe87359aa832431df5bc046c6645bf26)


Co-authored-by: nicanor zousko <zousko-stark@users.noreply.huggingface.co>

Files changed (1) hide show
  1. main.py +6 -0
main.py CHANGED
@@ -756,6 +756,12 @@ async def get_current_user(token: str = Depends(oauth2_scheme)) -> UserInDB:
756
  raise credentials_exception
757
  return user
758
 
 
 
 
 
 
 
759
  # =========================================================================
760
  # GRAD-CAM UTILITIES (Moved to explainability.py)
761
  # =========================================================================
 
756
  raise credentials_exception
757
  return user
758
 
759
+ async def get_current_active_user(current_user: UserInDB = Depends(get_current_user)) -> UserInDB:
760
+ """Dependency to get current active user."""
761
+ # Logic to check if active could be added here
762
+ # if not current_user.is_active: raise ...
763
+ return current_user
764
+
765
  # =========================================================================
766
  # GRAD-CAM UTILITIES (Moved to explainability.py)
767
  # =========================================================================