Spaces:
Sleeping
Sleeping
Download src/admin.py from SuhasGholkar/chatbot: direct link, hf CLI and curl.
- Browser
- Download file 667 Bytes
-
https://huggingface.co/spaces/SuhasGholkar/chatbot/resolve/main/src/admin.py
- Command line
-
hf download hf://spaces/SuhasGholkar/chatbot/src/admin.py
-
curl -L -o admin.py https://huggingface.co/spaces/SuhasGholkar/chatbot/resolve/main/src/admin.py
667 Bytes
| import streamlit as st | |
| from src.admin_export import render_admin_export_tab | |
| from src.auth import render_admin_create_user, render_admin_manage_users | |
| def render_admin_tabs(conn): | |
| """ | |
| Admin area with 3 tabs: | |
| - Export (new grid-based exporter) | |
| - Create User | |
| - Manage Users | |
| Pass the shared DB connection down into the tabs that need it. | |
| """ | |
| tab_export, tab_create, tab_manage = st.tabs( | |
| ["📥 Export", "👤 Create User", "🔧 Manage Users"] | |
| ) | |
| with tab_export: | |
| render_admin_export_tab(conn) | |
| with tab_create: | |
| render_admin_create_user() | |
| with tab_manage: | |
| render_admin_manage_users() |