Spaces:
Running
Running
import streamlit as st | |
from pymongo import MongoClient | |
from bardapi import Bard | |
import os | |
uri = os.environ["MONGO_CONNECTION_STRING"] | |
client = MongoClient(uri, tlsCertificteKeyFile= "files/cert.pem") | |
db = client["Cosmo"] | |
col = db["Tasks"] | |
task_values = { | |
"title" : st.text_input("Task Title"), | |
"prio" : st.text_input("Priority"), | |
"duedate" : st.text_input("Due Date"), | |
"status" : st.text_input("Status") | |
} | |
if st.button("Create Task"): | |
col.insert_one(task_values) | |
st.success("Task Created Successfully!") | |
st.balloons() |