Spaces:
Sleeping
Sleeping
Update private_gpt/launcher.py
Browse files- private_gpt/launcher.py +1 -7
private_gpt/launcher.py
CHANGED
@@ -119,13 +119,7 @@ def create_app(root_injector: Injector) -> FastAPI:
|
|
119 |
# Add more models as needed
|
120 |
]
|
121 |
|
122 |
-
|
123 |
-
if "admin" in current_user.get("role", []):
|
124 |
-
return models_data
|
125 |
-
|
126 |
-
# If the current user is a regular user, filter models based on their access
|
127 |
-
accessible_models = [model for model in models_data if "user" in model["access"]]
|
128 |
-
return accessible_models
|
129 |
|
130 |
# @model_router.post("/switch_model")
|
131 |
# async def switch_model(new_model: str):
|
|
|
119 |
# Add more models as needed
|
120 |
]
|
121 |
|
122 |
+
return models_data
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
# @model_router.post("/switch_model")
|
125 |
# async def switch_model(new_model: str):
|