Spaces:
Sleeping
Sleeping
this
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def view_rem():
|
|
| 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"):
|
|
@@ -46,7 +46,17 @@ def Chatbot():
|
|
| 46 |
umsg = bard.get_answer(query)["content"]
|
| 47 |
with st.chat_message("assistant"):
|
| 48 |
st.write(umsg)
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
Chatbot()
|
| 51 |
|
| 52 |
|
|
|
|
| 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", "notes"])
|
| 38 |
if ans["labels"][0] == "reminders":
|
| 39 |
values = getValues(query.lower())
|
| 40 |
with st.chat_message("assistant"):
|
|
|
|
| 46 |
umsg = bard.get_answer(query)["content"]
|
| 47 |
with st.chat_message("assistant"):
|
| 48 |
st.write(umsg)
|
| 49 |
+
|
| 50 |
+
elif ans["labels"][0] == "notes":
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
Notes = entry.lower().replace( " create a new note", "",).replace(" no new note", "")
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
Chatbot()
|
| 61 |
|
| 62 |
|