Ankush05 commited on
Commit
297850a
·
1 Parent(s): c4b114d
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -10,9 +10,9 @@ from transformers import pipeline, Conversation
10
 
11
 
12
 
13
- # classifyr = pipeline("zero-shot-classification")
14
- # convo = pipeline("conversational")
15
- classifi = pipeline(model="facebook/bart-large-mnli")
16
 
17
  uri = os.environ["MONGO_CONNECTION_STRING"]
18
  client = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
@@ -33,8 +33,8 @@ def view_rem():
33
 
34
  def Chatbot():
35
  st.title("Chatbot")
36
- if query :=st.chat_input("Enter your message"):
37
- ans = classifi(query,candidate_labels=["reminders", "general conversation"])
38
  if ans["labels"][0] == "reminders":
39
  values = getValues(query.lower())
40
  with st.chat_message("assistant"):
@@ -48,7 +48,7 @@ def Chatbot():
48
  st.write(umsg)
49
 
50
 
51
-
52
 
53
  def Create_Reminder():
54
  st.title("Create Reminder")
 
10
 
11
 
12
 
13
+ classifyr = pipeline("zero-shot-classification")
14
+ convo = pipeline("conversational")
15
+ # classifi = pipeline(model="facebook/bart-large-mnli")
16
 
17
  uri = os.environ["MONGO_CONNECTION_STRING"]
18
  client = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
 
33
 
34
  def Chatbot():
35
  st.title("Chatbot")
36
+ if query := st.chat_input("Enter your message"):
37
+ ans = classifyr(query,candidate_labels=["reminders", "general conversation"])
38
  if ans["labels"][0] == "reminders":
39
  values = getValues(query.lower())
40
  with st.chat_message("assistant"):
 
48
  st.write(umsg)
49
 
50
 
51
+ Chatbot()
52
 
53
  def Create_Reminder():
54
  st.title("Create Reminder")