Update app.py
Browse files
app.py
CHANGED
@@ -9,16 +9,18 @@ bardkey = os.environ.get("BARD_API_KEY")
|
|
9 |
bard = Bard(token=bardkey)
|
10 |
|
11 |
|
12 |
-
|
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 |
|