-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
28 lines (21 loc) · 771 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import streamlit as st
import pandas as pd #to load attendance data
import time
from datetime import datetime
ts=time.time()
date=datetime.fromtimestamp(ts).strftime("%d-%m-%Y")
timestamp=datetime.fromtimestamp(ts).strftime("%H:%M-%S")
from streamlit_autorefresh import st_autorefresh
count = st_autorefresh(interval=2000, limit=100, key="fizzbuzzcounter") #to auto referesh the webpage/webapp
# if count == 0:
# st.write("Count is zero")
# elif count % 3 == 0 and count % 5 == 0:
# st.write("FizzBuzz")
# elif count % 3 == 0:
# st.write("Fizz")
# elif count % 5 == 0:
# st.write("Buzz")
# else:
# st.write(f"Count: {count}")
df=pd.read_csv("Attendance/Attendance_" + date + ".csv")
st.dataframe(df.style.highlight_max(axis=0))