File size: 428 Bytes
3a66a27 43dad90 8da6c75 cf012cb 3a66a27 43dad90 3a66a27 43dad90 3a66a27 43dad90 3a66a27 43dad90 8da6c75 43dad90 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import streamlit as st
import os
import pandas as pd
import tranformers
# 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})
|