SuhasGholkar commited on
Commit
68c1a82
Β·
verified Β·
1 Parent(s): 6958ed4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -15
app.py CHANGED
@@ -5,6 +5,7 @@ import streamlit as st
5
  st.set_page_config(page_title="Ecomm Chatbot", layout="wide", page_icon="πŸ›οΈ")
6
 
7
  from src.brand import inject_brand_css, page_header, card_start, card_end
 
8
  inject_brand_css()
9
 
10
  st.markdown("""
@@ -28,8 +29,8 @@ from src.auth import (
28
  )
29
  from src.chat import render_chat_tab, ensure_chat_schema
30
  from src.mis import render_mis_admin, render_mis_user
31
- from src.admin import render_admin_create_user, render_admin_manage_users
32
- from src.video_export import render_admin_export_video_tab, ensure_video_deps
33
 
34
  LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
35
  logging.basicConfig(stream=sys.stdout,
@@ -86,20 +87,12 @@ def main():
86
  role = user["role"]
87
 
88
  if role == "admin":
89
- tab_mis, tab_export_video, tab_create_user, tab_manage_users = st.tabs(
90
- ["πŸ“Š MIS (Admin)", "πŸ“₯ Export + 🎬 Video", "πŸ‘€ Create User", "πŸ”§ Manage Users"]
91
- )
92
  with tab_mis:
93
- with get_connection() as conn:
94
- render_mis_admin(conn)
95
- with tab_export_video:
96
- with get_connection() as conn:
97
- render_admin_export_video_tab(conn)
98
- with tab_create_user:
99
- render_admin_create_user()
100
- with tab_manage_users:
101
- render_admin_manage_users()
102
-
103
  else:
104
  tab_chat, tab_mis_user, tab_export = st.tabs(["πŸ’¬ Chat", "πŸ“Š MIS", "πŸ“₯ Export"])
105
  with tab_chat:
 
5
  st.set_page_config(page_title="Ecomm Chatbot", layout="wide", page_icon="πŸ›οΈ")
6
 
7
  from src.brand import inject_brand_css, page_header, card_start, card_end
8
+
9
  inject_brand_css()
10
 
11
  st.markdown("""
 
29
  )
30
  from src.chat import render_chat_tab, ensure_chat_schema
31
  from src.mis import render_mis_admin, render_mis_user
32
+ from src.admin import render_admin_tabs
33
+ from src.video_export import ensure_video_deps
34
 
35
  LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
36
  logging.basicConfig(stream=sys.stdout,
 
87
  role = user["role"]
88
 
89
  if role == "admin":
90
+ tab_mis, tab_admin = st.tabs(["πŸ“Š MIS (Admin)", "πŸ›  Admin Tools"])
 
 
91
  with tab_mis:
92
+ from src.mis import render_mis_admin
93
+ render_mis_admin(conn)
94
+ with tab_admin:
95
+ render_admin_tabs(conn)
 
 
 
 
 
 
96
  else:
97
  tab_chat, tab_mis_user, tab_export = st.tabs(["πŸ’¬ Chat", "πŸ“Š MIS", "πŸ“₯ Export"])
98
  with tab_chat: