File size: 760 Bytes
c226dff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c910970
 
 
 
9e04f95
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# from transformers import pipeline, Conversation
# # import streamlit_option_menu
# import streamlit as st

# def Chat():

#     query = st.chat_input("Enter your query")
#     convo = pipeline("conversational")
#     oracle = pipeline(task="zero-shot-classification", model="facebook/bart-large-mnli")
#     usrinput = Conversation(query)
#     chitchat = convo(usrinput)
#     ans = oracle(
#         query,
#         candidate_labels=["logout"])

#     if ans["scores"][0] > 0.85:
#         st.session_state["user"] = "visitor"
#         with st.chat_message("assistant"):
#             "You are now living in dream" 
#         st.experimental_rerun()
#     else:
#         with st.chat_message("assistant"):
#             chitchat