Ankush05 commited on
Commit
fc43010
1 Parent(s): 61eb241

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -9,16 +9,18 @@ bardkey = os.environ.get("BARD_API_KEY")
9
  bard = Bard(token=bardkey)
10
 
11
 
12
- # convo = pipeline("conversational")
13
 
14
 
15
 
16
  def chatbot():
17
  st.title("ChatBot")
18
  if message := st.chat_input("Enter your message"):
 
19
  umsg = bard.get_answer(message)["content"]
20
  with st.chat_message("assistant"):
21
  st.write(umsg)
 
22
 
23
 
24
 
 
9
  bard = Bard(token=bardkey)
10
 
11
 
12
+ classifi = pipeline(model="facebook/bart-large-mnli")
13
 
14
 
15
 
16
  def chatbot():
17
  st.title("ChatBot")
18
  if message := st.chat_input("Enter your message"):
19
+ ans = classifi(message, candidate_lables=["Reminder", "General Conversation"])
20
  umsg = bard.get_answer(message)["content"]
21
  with st.chat_message("assistant"):
22
  st.write(umsg)
23
+ st.write(ans)
24
 
25
 
26