Spaces:
Sleeping
Sleeping
Nikhil0987
commited on
Commit
•
d75866e
1
Parent(s):
3911b7f
this
Browse files
auth.py
CHANGED
@@ -92,6 +92,7 @@ def main():
|
|
92 |
login()
|
93 |
elif option == "Signup":
|
94 |
signup()
|
|
|
95 |
|
96 |
|
97 |
main()
|
|
|
92 |
login()
|
93 |
elif option == "Signup":
|
94 |
signup()
|
95 |
+
|
96 |
|
97 |
|
98 |
main()
|
convo.py
CHANGED
@@ -5,23 +5,21 @@ from streamlit_option_menu import option_menu
|
|
5 |
|
6 |
def convo():
|
7 |
convo = st.text_input("Enter your message")
|
8 |
-
chatbot = pipeline(task=
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
convo()
|
27 |
-
|
|
|
5 |
|
6 |
def convo():
|
7 |
convo = st.text_input("Enter your message")
|
8 |
+
chatbot = pipeline(task="conversational", model="microsoft/DialoGPT-medium")
|
9 |
+
conversation = Conversation(convo)
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
# candidate_labels = ["HELP", "PROBLEM SOLVE", "GENERAL TALK"]
|
14 |
+
|
15 |
+
|
16 |
+
ans = chatbot(conversation)
|
17 |
+
# add_user_input = st.button("Add User Input")
|
18 |
+
|
19 |
+
# conversation.add_user_input("{}".format(convo))
|
20 |
+
# conversation = chatbot(conversation)
|
21 |
+
# conversation.generated_responses[-1]
|
22 |
+
st.write(ans)
|
23 |
+
|
24 |
+
|
25 |
+
convo()
|
|
|
|
home.py
CHANGED
@@ -13,7 +13,7 @@ def dashboard():
|
|
13 |
# st.header("Dashboard")
|
14 |
|
15 |
with st.sidebar:
|
16 |
-
selected = option_menu("Menu", ["Home", "Dashboard","Chat","Logout"], icons=['house', 'activity'], menu_icon="cast", default_index=0)
|
17 |
if selected == "Home":
|
18 |
homepage()
|
19 |
|
@@ -21,6 +21,12 @@ def dashboard():
|
|
21 |
"gfjfvjhvjhv"
|
22 |
elif selected == "Chat":
|
23 |
Chat()
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
|
26 |
|
|
|
13 |
# st.header("Dashboard")
|
14 |
|
15 |
with st.sidebar:
|
16 |
+
selected = option_menu("Menu", ["Home", "Dashboard","Chat","Conversation","Logout"], icons=['house', 'activity'], menu_icon="cast", default_index=0)
|
17 |
if selected == "Home":
|
18 |
homepage()
|
19 |
|
|
|
21 |
"gfjfvjhvjhv"
|
22 |
elif selected == "Chat":
|
23 |
Chat()
|
24 |
+
elif selected == "Conversation":
|
25 |
+
convo()
|
26 |
+
elif selected == "Logout":
|
27 |
+
st.session_state["user"] = "visitor"
|
28 |
+
st.experimental_rerun()
|
29 |
+
|
30 |
|
31 |
|
32 |
|