CosmoAI commited on
Commit
c1666a3
·
1 Parent(s): c1f427f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import streamlit as st
2
  from pymongo import MongoClient
3
  from bardapi import Bard
4
  import os
 
5
 
6
 
7
  uri = os.environ["MONGO_CONNECTION_STRING"]
@@ -9,6 +10,14 @@ client = MongoClient(uri, tlsCertificateKeyFile= "files/cert.pem")
9
  db = client["Cosmo"]
10
  col = db["Tasks"]
11
 
 
 
 
 
 
 
 
 
12
 
13
  task_values = {
14
  "title" : st.text_input("Task Title"),
@@ -20,4 +29,7 @@ task_values = {
20
  if st.button("Create Task"):
21
  col.insert_one(task_values)
22
  st.success("Task Created Successfully!")
23
- st.balloons()
 
 
 
 
2
  from pymongo import MongoClient
3
  from bardapi import Bard
4
  import os
5
+ from plyer import notifications as nt
6
 
7
 
8
  uri = os.environ["MONGO_CONNECTION_STRING"]
 
10
  db = client["Cosmo"]
11
  col = db["Tasks"]
12
 
13
+ def notifier():
14
+ nt.notify(
15
+ title = "This is notification",
16
+ message = "This is the message",
17
+ timeout = 10,
18
+ app_icon = "logo.png"
19
+ )
20
+
21
 
22
  task_values = {
23
  "title" : st.text_input("Task Title"),
 
29
  if st.button("Create Task"):
30
  col.insert_one(task_values)
31
  st.success("Task Created Successfully!")
32
+ st.balloons()
33
+ notifier()
34
+
35
+