This
Browse files- app.py +10 -5
- requirements.txt +0 -2
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
from streamlit_option_menu import option_menu
|
| 3 |
from pymongo import MongoClient
|
| 4 |
import os
|
| 5 |
-
import
|
|
|
|
| 6 |
|
| 7 |
|
| 8 |
# Connecting to MongoDB
|
|
@@ -16,7 +16,12 @@ col = db["chatbot"]
|
|
| 16 |
|
| 17 |
def chatbot():
|
| 18 |
st.title("ChatBot")
|
| 19 |
-
|
| 20 |
-
if
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
|
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
from pymongo import MongoClient
|
| 3 |
import os
|
| 4 |
+
from transformers import pipeline, Conversation
|
| 5 |
+
|
| 6 |
|
| 7 |
|
| 8 |
# Connecting to MongoDB
|
|
|
|
| 16 |
|
| 17 |
def chatbot():
|
| 18 |
st.title("ChatBot")
|
| 19 |
+
uinput = st.chat_input("Enter your message")
|
| 20 |
+
if uinput:
|
| 21 |
+
st.chat(uinput)
|
| 22 |
+
pipe = Conversation()
|
| 23 |
+
response = pipe(uinput)
|
| 24 |
+
st.chat(response)
|
| 25 |
+
print(response)
|
| 26 |
+
|
| 27 |
|
requirements.txt
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
streamlit
|
| 2 |
streamlit-option-menu
|
| 3 |
-
pandas
|
| 4 |
pymongo
|
| 5 |
transformers[torch]
|
| 6 |
-
sentence-transformers
|
| 7 |
dnspython
|
|
|
|
| 1 |
streamlit
|
| 2 |
streamlit-option-menu
|
|
|
|
| 3 |
pymongo
|
| 4 |
transformers[torch]
|
|
|
|
| 5 |
dnspython
|