Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,15 @@ def generateResponse(dataFrame,prompt):
|
|
36 |
answer = pandas_agent.chat(prompt)
|
37 |
return answer
|
38 |
|
|
|
|
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# Initialize Firebase app
|
42 |
if not firebase_admin._apps:
|
@@ -113,8 +121,8 @@ def main():
|
|
113 |
st.sidebar.image("ecomp1.jpg", use_column_width=True)
|
114 |
|
115 |
with st.sidebar:
|
116 |
-
tabs = on_hover_tabs(tabName=['Dashboard', 'Map', 'Chat'],
|
117 |
-
iconName=['dashboard', 'map', 'chat'], default_choice=0)
|
118 |
|
119 |
if tabs =='Dashboard':
|
120 |
st.header("Complaints")
|
@@ -160,7 +168,14 @@ def main():
|
|
160 |
answer = generateResponse(dataFrame=complaints_df,prompt=user_input)
|
161 |
st.write(answer)
|
162 |
|
|
|
|
|
|
|
|
|
163 |
|
|
|
|
|
|
|
164 |
|
165 |
|
166 |
|
|
|
36 |
answer = pandas_agent.chat(prompt)
|
37 |
return answer
|
38 |
|
39 |
+
def generate_random_team():
|
40 |
+
"""Generates a random list of 3 men and 3 women with WhatsApp icons."""
|
41 |
|
42 |
+
men_names = ["John Khumalo", "Michael Smith", "David Johnson"]
|
43 |
+
women_names = ["Emily Brown", "Olivia Nkosi", "Sophia Miller"]
|
44 |
+
|
45 |
+
team_members = list(zip(men_names + women_names, ["whatsapp_icon.png"] * 6))
|
46 |
+
random.shuffle(team_members)
|
47 |
+
return team_members
|
48 |
|
49 |
# Initialize Firebase app
|
50 |
if not firebase_admin._apps:
|
|
|
121 |
st.sidebar.image("ecomp1.jpg", use_column_width=True)
|
122 |
|
123 |
with st.sidebar:
|
124 |
+
tabs = on_hover_tabs(tabName=['Dashboard', 'Map', 'Chat', 'Response Team'],
|
125 |
+
iconName=['dashboard', 'map', 'chat', 'person'], default_choice=0)
|
126 |
|
127 |
if tabs =='Dashboard':
|
128 |
st.header("Complaints")
|
|
|
168 |
answer = generateResponse(dataFrame=complaints_df,prompt=user_input)
|
169 |
st.write(answer)
|
170 |
|
171 |
+
elif tabs == 'Response Team':
|
172 |
+
st.title("Random Response Team")
|
173 |
+
|
174 |
+
team = generate_random_team()
|
175 |
|
176 |
+
for name, icon in team:
|
177 |
+
st.write(f"{name} 📱")
|
178 |
+
|
179 |
|
180 |
|
181 |
|