Update app.py
Browse files
app.py
CHANGED
|
@@ -35,11 +35,14 @@ async def lifespan(app: FastAPI):
|
|
| 35 |
session_state["data"] = json.load(f)
|
| 36 |
with open("synthesized_full_roadmap.json", "r") as f:
|
| 37 |
session_state["full_roadmap"] = json.load(f)
|
|
|
|
|
|
|
| 38 |
print("✅ Roadmaps loaded successfully.")
|
| 39 |
except Exception as e:
|
| 40 |
print(f"❌ Error loading roadmaps: {e}")
|
| 41 |
yield
|
| 42 |
print("🛑 Shutting down.")
|
|
|
|
| 43 |
|
| 44 |
# Initialize FastAPI app
|
| 45 |
app = FastAPI(
|
|
@@ -49,7 +52,6 @@ app = FastAPI(
|
|
| 49 |
lifespan=lifespan
|
| 50 |
)
|
| 51 |
|
| 52 |
-
|
| 53 |
# Function to mark tasks as incomplete
|
| 54 |
def process_task_completion_data():
|
| 55 |
data = session_state.data
|
|
@@ -822,9 +824,6 @@ def agent2(
|
|
| 822 |
if session_state["data"] is None:
|
| 823 |
return {"error": "Roadmap data not loaded. Load data first."}
|
| 824 |
|
| 825 |
-
# Process tasks as incomplete
|
| 826 |
-
process_task_completion_data()
|
| 827 |
-
|
| 828 |
# Optimize task distribution with user input
|
| 829 |
shift_and_sort_the_roadmap(
|
| 830 |
session_state["full_roadmap"],
|
|
|
|
| 35 |
session_state["data"] = json.load(f)
|
| 36 |
with open("synthesized_full_roadmap.json", "r") as f:
|
| 37 |
session_state["full_roadmap"] = json.load(f)
|
| 38 |
+
# Process tasks as incomplete
|
| 39 |
+
process_task_completion_data()
|
| 40 |
print("✅ Roadmaps loaded successfully.")
|
| 41 |
except Exception as e:
|
| 42 |
print(f"❌ Error loading roadmaps: {e}")
|
| 43 |
yield
|
| 44 |
print("🛑 Shutting down.")
|
| 45 |
+
|
| 46 |
|
| 47 |
# Initialize FastAPI app
|
| 48 |
app = FastAPI(
|
|
|
|
| 52 |
lifespan=lifespan
|
| 53 |
)
|
| 54 |
|
|
|
|
| 55 |
# Function to mark tasks as incomplete
|
| 56 |
def process_task_completion_data():
|
| 57 |
data = session_state.data
|
|
|
|
| 824 |
if session_state["data"] is None:
|
| 825 |
return {"error": "Roadmap data not loaded. Load data first."}
|
| 826 |
|
|
|
|
|
|
|
|
|
|
| 827 |
# Optimize task distribution with user input
|
| 828 |
shift_and_sort_the_roadmap(
|
| 829 |
session_state["full_roadmap"],
|