Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
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"]
|
8 |
+
client = MongoClient(uri)
|
9 |
+
db = client["Cosmo"]
|
10 |
+
col = db["Tasks"]
|
11 |
+
|
12 |
+
|
13 |
+
task_values = {
|
14 |
+
"title" : st.text_input("Task Title")
|
15 |
+
"prio" : st.text_input("Priority")
|
16 |
+
"duedate" : st.text_input("Due Date")
|
17 |
+
"status" : st.text_input("Status")
|
18 |
+
}
|
19 |
+
|
20 |
+
col.insert_one(task_values)
|