tbaig1605 commited on
Commit
e6587d0
·
verified ·
1 Parent(s): 4ade1c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -38,7 +38,7 @@ if st.button("🧮 Calculate Critical Path"):
38
  for from_task, to_task, rel, lag in dependencies:
39
  G.add_edge(from_task, to_task, type=rel, lag=lag)
40
 
41
- # CPM calculation (simplified for FS and SS, other types treated as FS for now)
42
  es = {}
43
  ef = {}
44
  top_order = list(nx.topological_sort(G))
@@ -85,7 +85,7 @@ if st.button("🧮 Calculate Critical Path"):
85
  st.success(f"Critical Path: {' ➝ '.join(critical_path)}")
86
  st.info(f"Total Project Duration: {max(ef.values())} days")
87
 
88
- # Gantt chart
89
  df = pd.DataFrame([
90
  {
91
  "Task": t,
@@ -108,3 +108,4 @@ if st.button("🧮 Calculate Critical Path"):
108
  )
109
  st.plotly_chart(fig, use_container_width=True)
110
 
 
 
38
  for from_task, to_task, rel, lag in dependencies:
39
  G.add_edge(from_task, to_task, type=rel, lag=lag)
40
 
41
+ # CPM calculation (simplified for FS and SS, other types handled properly now)
42
  es = {}
43
  ef = {}
44
  top_order = list(nx.topological_sort(G))
 
85
  st.success(f"Critical Path: {' ➝ '.join(critical_path)}")
86
  st.info(f"Total Project Duration: {max(ef.values())} days")
87
 
88
+ # Gantt chart (adjusted to handle display properly)
89
  df = pd.DataFrame([
90
  {
91
  "Task": t,
 
108
  )
109
  st.plotly_chart(fig, use_container_width=True)
110
 
111
+