Spaces:
Sleeping
Sleeping
shamimjony1000
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
from task_operations import TaskManager
|
3 |
from task_visualization import TaskVisualizer
|
@@ -36,27 +38,39 @@ def main():
|
|
36 |
|
37 |
if st.button("Daily Report"):
|
38 |
report = task_manager.generate_report('daily')
|
39 |
-
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
42 |
|
43 |
if st.button("Weekly Report"):
|
44 |
report = task_manager.generate_report('weekly')
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
48 |
|
49 |
if st.button("Monthly Report"):
|
50 |
report = task_manager.generate_report('monthly')
|
51 |
-
|
52 |
-
|
53 |
-
|
|
|
|
|
|
|
54 |
|
55 |
if st.button("Yearly Report"):
|
56 |
report = task_manager.generate_report('yearly')
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
60 |
|
61 |
visualizer.plot_performance()
|
62 |
visualizer.plot_overall_category_performance()
|
|
|
1 |
+
# app.py
|
2 |
+
|
3 |
import streamlit as st
|
4 |
from task_operations import TaskManager
|
5 |
from task_visualization import TaskVisualizer
|
|
|
38 |
|
39 |
if st.button("Daily Report"):
|
40 |
report = task_manager.generate_report('daily')
|
41 |
+
if not report.empty:
|
42 |
+
st.write("Daily Report:")
|
43 |
+
st.dataframe(report)
|
44 |
+
visualizer.plot_category_performance('daily', task_manager)
|
45 |
+
else:
|
46 |
+
st.warning("No tasks for today.")
|
47 |
|
48 |
if st.button("Weekly Report"):
|
49 |
report = task_manager.generate_report('weekly')
|
50 |
+
if not report.empty:
|
51 |
+
st.write("Weekly Report:")
|
52 |
+
st.dataframe(report)
|
53 |
+
visualizer.plot_category_performance('weekly', task_manager)
|
54 |
+
else:
|
55 |
+
st.warning("No tasks for this week.")
|
56 |
|
57 |
if st.button("Monthly Report"):
|
58 |
report = task_manager.generate_report('monthly')
|
59 |
+
if not report.empty:
|
60 |
+
st.write("Monthly Report:")
|
61 |
+
st.dataframe(report)
|
62 |
+
visualizer.plot_category_performance('monthly', task_manager)
|
63 |
+
else:
|
64 |
+
st.warning("No tasks for this month.")
|
65 |
|
66 |
if st.button("Yearly Report"):
|
67 |
report = task_manager.generate_report('yearly')
|
68 |
+
if not report.empty:
|
69 |
+
st.write("Yearly Report:")
|
70 |
+
st.dataframe(report)
|
71 |
+
visualizer.plot_category_performance('yearly', task_manager)
|
72 |
+
else:
|
73 |
+
st.warning("No tasks for this year.")
|
74 |
|
75 |
visualizer.plot_performance()
|
76 |
visualizer.plot_overall_category_performance()
|