Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -28,9 +28,9 @@ class RoadmapInput(BaseModel):
|
|
28 |
startphyRoadmapFrom: str
|
29 |
startchemRoadmapFrom: str
|
30 |
startmathRoadmapFrom: str
|
31 |
-
userleft_topic_phy: List[
|
32 |
-
userleft_topic_chem: List[
|
33 |
-
userleft_topic_maths: List[
|
34 |
total_time: int
|
35 |
|
36 |
output_structure = """
|
@@ -121,9 +121,12 @@ async def generate_roadmap(input_data: RoadmapInput):
|
|
121 |
chemistry_topics = get_topics_within_timeframe(chem, input_data.total_time, input_data.startchemRoadmapFrom)
|
122 |
mathematics_topics = get_topics_within_timeframe(maths, input_data.total_time, input_data.startmathRoadmapFrom)
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
127 |
|
128 |
# User persona string
|
129 |
userPersona = f"""
|
|
|
28 |
startphyRoadmapFrom: str
|
29 |
startchemRoadmapFrom: str
|
30 |
startmathRoadmapFrom: str
|
31 |
+
userleft_topic_phy: List[dict]
|
32 |
+
userleft_topic_chem: List[dict]
|
33 |
+
userleft_topic_maths: List[dict]
|
34 |
total_time: int
|
35 |
|
36 |
output_structure = """
|
|
|
121 |
chemistry_topics = get_topics_within_timeframe(chem, input_data.total_time, input_data.startchemRoadmapFrom)
|
122 |
mathematics_topics = get_topics_within_timeframe(maths, input_data.total_time, input_data.startmathRoadmapFrom)
|
123 |
|
124 |
+
for topic in reversed(userleft_topic_phy):
|
125 |
+
physics_topics.insert(0, topic)
|
126 |
+
for topic in reversed(userleft_topic_chem):
|
127 |
+
chemistry_topics.insert(0, topic)
|
128 |
+
for topic in reversed(userleft_topic_maths):
|
129 |
+
mathematics_topics.insert(0, topic)
|
130 |
|
131 |
# User persona string
|
132 |
userPersona = f"""
|