Task-Management / app.py
CosmoAI's picture
Update app.py
9617d9b
raw
history blame
828 Bytes
import streamlit as st
from pymongo import MongoClient
from bardapi import Bard
import os
from plyer import notification as nt
uri = os.environ["MONGO_CONNECTION_STRING"]
client = MongoClient(uri, tlsCertificateKeyFile= "files/cert.pem")
db = client["Cosmo"]
col = db["Tasks"]
# def notifier():
# nt.notify(
# title = "This is notification",
# message = "This is the message",
# timeout = 10,
# app_icon = "logo.png"
# )
task_values = {
"title" : st.text_input("Task Title"),
"prio" : st.text_input("Priority"),
"duedate" : st.text_input("Due Date"),
"status" : False
}
if st.button("Create Task"):
col.insert_one(task_values)
st.success("Task Created Successfully!")
st.balloons()
if st.button("notify"):
st.toast("You have a new reminder")