Ankush05 commited on
Commit
b3290b7
·
1 Parent(s): 7dc69fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -5,6 +5,8 @@ from bardapi import Bard
5
  import os
6
  from getvalues import getValues
7
  from pymongo import MongoClient
 
 
8
 
9
  uri = os.environ.get("MONGO_CONNECTION_STRING")
10
  conn = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
@@ -19,7 +21,10 @@ bard = Bard(token=bardkey)
19
 
20
  classifi = pipeline(model="facebook/bart-large-mnli")
21
 
22
-
 
 
 
23
 
24
  def chatbot():
25
  st.title("ChatBot")
@@ -36,5 +41,10 @@ def chatbot():
36
  st.write(umsg)
37
 
38
 
39
-
40
- chatbot()
 
 
 
 
 
 
5
  import os
6
  from getvalues import getValues
7
  from pymongo import MongoClient
8
+ from streamlit_option_menu import option_menu
9
+ import pandas as pd
10
 
11
  uri = os.environ.get("MONGO_CONNECTION_STRING")
12
  conn = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
 
21
 
22
  classifi = pipeline(model="facebook/bart-large-mnli")
23
 
24
+ def view_rem():
25
+ allrem = list(col.find())
26
+ remdata = pd.DataFrame(allrem)
27
+ st.dataframe(remdata)
28
 
29
  def chatbot():
30
  st.title("ChatBot")
 
41
  st.write(umsg)
42
 
43
 
44
+ with st.sidebar:
45
+ selected = option_menu(None, options=["Chatbot", "View Reminders"])
46
+ if selected == "Chatbot":
47
+ chatbot()
48
+ elif selected == "View Reminders":
49
+ view_rem()
50
+