ChatBot / app.py
Ankush05's picture
this
43dad90
raw
history blame
No virus
486 Bytes
import streamlit as st
from streamlit_option_menu import option_menu
from pymongo import MongoClient
import os
import pandas as pd
# Connecting to MongoDB
uri = os.environ["MONGO_CONNECTION_STRING"]
client = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
db = client["myapp"]
col = db["chatbot"]
def chatbot():
st.title("ChatBot")
message = st.text_input("Enter your query here")
if st.button ("Submit"):
col.insert_one({"message": message})