Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ fetchvalue = pipeline(model="Jean-Baptiste/camembert-ner", aggregation_strategy=
|
|
8 |
|
9 |
bardkey = os.environ.get("BARD_API_KEY")
|
10 |
|
11 |
-
|
12 |
if query := st.chat_input("Hi, how can I help you"):
|
13 |
usrintent = intent(query, candidate_labels=["Reminder", "General Conversation"])
|
14 |
if usrintent["labels"][0] == "Reminder":
|
@@ -16,6 +16,7 @@ if query := st.chat_input("Hi, how can I help you"):
|
|
16 |
with st.chat_message("assistant"):
|
17 |
st.write(values)
|
18 |
elif usrintent["labels"][0] == "General Conversation":
|
|
|
19 |
ans = bard.get_answer(query)
|
20 |
with st.chat_message("assistant"):
|
21 |
st.write(ans['content'])
|
|
|
8 |
|
9 |
bardkey = os.environ.get("BARD_API_KEY")
|
10 |
|
11 |
+
|
12 |
if query := st.chat_input("Hi, how can I help you"):
|
13 |
usrintent = intent(query, candidate_labels=["Reminder", "General Conversation"])
|
14 |
if usrintent["labels"][0] == "Reminder":
|
|
|
16 |
with st.chat_message("assistant"):
|
17 |
st.write(values)
|
18 |
elif usrintent["labels"][0] == "General Conversation":
|
19 |
+
bard = Bard(token=bardkey)
|
20 |
ans = bard.get_answer(query)
|
21 |
with st.chat_message("assistant"):
|
22 |
st.write(ans['content'])
|