rairo commited on
Commit
4347f12
·
verified ·
1 Parent(s): 4c41079

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -19
app.py CHANGED
@@ -4,6 +4,9 @@ import streamlit as st
4
  import requests
5
  import pandas as pd
6
  from datetime import datetime
 
 
 
7
 
8
  # Initialize Firebase app
9
  if not firebase_admin._apps:
@@ -54,6 +57,7 @@ def user_authentication():
54
 
55
  # Main Streamlit app
56
  def main():
 
57
  if "user_id" not in st.session_state:
58
  user_authentication()
59
  return
@@ -70,34 +74,35 @@ def main():
70
  st.sidebar.title("E-complaint")
71
  st.sidebar.image("ecomp.png", use_column_width=True)
72
 
 
 
 
73
 
 
 
 
 
 
74
 
75
- st.sidebar.subheader("Technology Stack")
76
-
77
- st.sidebar.markdown("""
78
- streamlit!!!!
79
- """)
80
 
81
- st.sidebar.subheader("Architecture and Design")
82
 
83
- st.sidebar.markdown("""
84
- loggd in
85
- """)
86
 
 
 
 
87
 
88
- # Display weekly and monthly summaries
89
- st.header("Complaints")
90
- # Then query to list all users
91
- complaints_ref = db.collection('complaints')
92
 
93
- complaints_list = []
94
- for doc in complaints_ref.stream():
95
- a = doc.to_dict()
96
- complaints_list.append(a)
97
 
98
- complaints_df = pd.DataFrame(complaints_list)
99
 
100
- st.dataframe(complaints_df)
101
 
102
 
103
 
 
4
  import requests
5
  import pandas as pd
6
  from datetime import datetime
7
+ from st_on_hover_tabs import on_hover_tabs
8
+ import streamlit as st
9
+ st.set_page_config(layout="wide")
10
 
11
  # Initialize Firebase app
12
  if not firebase_admin._apps:
 
57
 
58
  # Main Streamlit app
59
  def main():
60
+ st.markdown('<style>' + open('./style.css').read() + '</style>', unsafe_allow_html=True)
61
  if "user_id" not in st.session_state:
62
  user_authentication()
63
  return
 
74
  st.sidebar.title("E-complaint")
75
  st.sidebar.image("ecomp.png", use_column_width=True)
76
 
77
+ with st.sidebar:
78
+ tabs = on_hover_tabs(tabName=['Dashboard', 'Map', 'Chat'],
79
+ iconName=['dashboard', 'map', 'chat'], default_choice=0)
80
 
81
+ if tabs =='Dashboard':
82
+ st.title("Navigation Bar")
83
+ st.header("Complaints")
84
+ # Then query to list all users
85
+ complaints_ref = db.collection('complaints')
86
 
87
+ complaints_list = []
88
+ for doc in complaints_ref.stream():
89
+ a = doc.to_dict()
90
+ complaints_list.append(a)
 
91
 
92
+ complaints_df = pd.DataFrame(complaints_list)
93
 
94
+ st.dataframe(complaints_df)
 
 
95
 
96
+ elif tabs == 'Map':
97
+ st.title("Map")
98
+ st.write('Name of option is {}'.format(tabs))
99
 
100
+ elif tabs == 'Chat':
101
+ st.title("Chat Powered by Gemini")
102
+ st.write('Name of option is {}'.format(tabs))
 
103
 
 
 
 
 
104
 
 
105
 
 
106
 
107
 
108