Ankush05 commited on
Commit
d45b18e
0 Parent(s):
Files changed (6) hide show
  1. .gitattributes +35 -0
  2. README.md +13 -0
  3. app.py +86 -0
  4. database/cert.pem +81 -0
  5. home.py +33 -0
  6. requirements.txt +5 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Thursday
3
+ emoji: 🔥
4
+ colorFrom: pink
5
+ colorTo: green
6
+ sdk: streamlit
7
+ sdk_version: 1.26.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: openrail
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from streamlit_option_menu import option_menu
3
+ from pymongo import MongoClient
4
+ import os
5
+ from home import dashboard
6
+
7
+
8
+ if 'user' not in st.session_state:
9
+ st.session_state['user'] = "Guest"
10
+
11
+
12
+ # Connecting to MongoD
13
+ uri = os.environ["MONGO_CONNECTION_STRING"]
14
+
15
+ client = MongoClient(uri, tlsCertificateKeyFile="database/cert.pem")
16
+
17
+ db = client["myapp"]
18
+
19
+ col = db["users"]
20
+
21
+ # Checking connectiong to database
22
+ try:
23
+ client.admin.command('ping')
24
+ print("Connection Established Successfully!")
25
+ except Exception as e:
26
+ print(f"Not Connected: {e}")
27
+
28
+
29
+
30
+ def Signup():
31
+ username = st.text_input("Username")
32
+ password = st.text_input("Password", type="password")
33
+ confpass = st.text_input("Confirm Password", type="password")
34
+
35
+ newuser = {
36
+ "username": username,"password": password
37
+ }
38
+ if st.button("Signup"):
39
+ if password == confpass:
40
+ col.insert_one({"username": username, "password": password})
41
+ st.write("You are Registered Sucessfully")
42
+ else:
43
+ "Password do not match"
44
+
45
+
46
+
47
+ def Login():
48
+ username = st.text_input("username")
49
+ password = st.text_input("Password")
50
+
51
+ if st.button("Login"):
52
+ allusers = list(col.find())
53
+ for anyuser in allusers:
54
+ if username == anyuser["username"] and password == anyuser["password"]:
55
+ st.success("You are logged in")
56
+ st.session_state["user"] = "isuser"
57
+ st.experimental_rerun()
58
+ else:
59
+ st.error("Your username or password do not match")
60
+
61
+
62
+
63
+ def main():
64
+ if st.session_state["user"] == "Guest":
65
+ with st.sidebar:
66
+ selected = option_menu("Menu", ["Login", "Signup"], icons = ["house", "person"])
67
+ if selected == "Login":
68
+ Login()
69
+
70
+ elif selected == "Signup":
71
+ Signup()
72
+ elif st.session_state["user"] == "isuser":
73
+ dashboard()
74
+
75
+ main()
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
database/cert.pem ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIFCTCCAvGgAwIBAgIIS/QLtxeQiowwDQYJKoZIhvcNAQELBQAwSTEhMB8GA1UE
3
+ AxMYNjRmMDc2YTZjZDBkZjY3OTE1ZGFkMDZmMQ4wDAYDVQQLEwVBdGxhczEUMBIG
4
+ A1UEChMLTW9uZ29EQiBJbmMwHhcNMjMwOTExMDU1MTIxWhcNMjQwOTExMDY1MTIx
5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ldeP/KqqyBmU
69
+ cSW3PkxRmem990E1bApVnstB7FPhBDwVHZg+gr1TAoIBAQCBolFHpnclzwA605Kk
70
+ JvHtWjJn+QkZyFOZq/ZHdFjnDATLD6TLnMKbBzMp2iI6cSFbWfNEIDS4HtiO/VVm
71
+ ko2jII7YoJ+Z72BiNQSGZciFb3BjfLOZ+oArvxbW7OrTl2LSMDKB0S4fy7pwLCEZ
72
+ wbBgAzQ8PVRST5c2mf0wrbFS9hlJPl+5pyqDpEisVysnDwZ6PDssZorIOe5/VsTq
73
+ n7OVzk/NRIpXmJuwvLig+gT9CpkxY8qyGSmLKXyGeVuAO3m9qfrUSoTr42w9ks2i
74
+ EOX+zgHKaYCaDMl74A3Ybua5pK+Om85zELIEtm5EWhCWNSL2ihX4s0cGZaM7jbxK
75
+ BvrJAoIBACK7+MY2pVAGvAK7284uapOYY9+D08HPJW0pLeZmaV6iZqVgqzAX+uEI
76
+ /7SQQSTSPvJ1p0xbEovsWG2Dbiskxmp7G8PFMdIlS3J+YLk3MdTZA/DIJuix0l4s
77
+ FN/G2Bqt1cz9qvbYXGpRtqypAwaL+TDS+xAQN6iU8maOOHsRhqkVooY/WY8buide
78
+ JazHZ3zSDlwPmmdLZCgkuRoK8DhMB9ns1XDhACUGJq1XVJTJkiZ0LUjr9ADrX2Jo
79
+ UZHwQ+V60Ae2ytk5RpAk5iCZLsGgRUaN3ekaRWDt70bbF29O/ZSGc31GOOGAyFnQ
80
+ jpkwzHjebchnBqEEE2LyGR0mvx10R74=
81
+ -----END PRIVATE KEY-----
home.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from streamlit_option_menu import option_menu
3
+ from pymongo import MongoClient
4
+ import os
5
+ import pandas as pd
6
+
7
+ def Reminder():
8
+ embed = '''<iframe
9
+ src="https://ankush05-reminder.hf.space"
10
+ frameborder="0"
11
+ width="1200"
12
+ height="700"
13
+ ></iframe>
14
+ '''
15
+ st.markdown(embed, unsafe_allow_html=True)
16
+
17
+
18
+ def ChatBot():
19
+ st.title("ChatBot")
20
+
21
+ def dashboard():
22
+ st.title("Welcome to the Dashboard")
23
+ with st.sidebar:
24
+ selected = option_menu(None, ["Reminder", "ChatBot", "Logout"], icons=["plus", "eye", "power-off"])
25
+
26
+ if selected == "Reminder":
27
+ Reminder()
28
+ elif selected == "ChatBot":
29
+ st.subheader("View Reminders")
30
+ ChatBot()
31
+ elif selected == "Logout":
32
+ st.session_state["user"] = "Guest"
33
+ st.experimental_rerun()
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ streamlit
2
+ pandas
3
+ streamlit-option-menu
4
+ pymongo
5
+ dnspython