Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -16,12 +16,11 @@ class RoadmapInput(BaseModel):
|
|
| 16 |
new_topic_approach: str
|
| 17 |
old_topic_approach: str
|
| 18 |
topic_ratio: str
|
| 19 |
-
hours_of_study:
|
| 20 |
-
hours_of_study_weekends:
|
| 21 |
revision_days: str
|
| 22 |
test_days: str
|
| 23 |
class_std: str
|
| 24 |
-
months_of_study: int
|
| 25 |
completed_phy_chapters: List[str]
|
| 26 |
completed_chem_chapters: List[str]
|
| 27 |
completed_maths_chapters: List[str]
|
|
@@ -31,7 +30,6 @@ class RoadmapInput(BaseModel):
|
|
| 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 = """
|
| 37 |
{
|
|
@@ -118,11 +116,11 @@ async def generate_roadmap(input_data: RoadmapInput):
|
|
| 118 |
phy = remove_completed_chapters(phy, input_data.completed_phy_chapters)
|
| 119 |
chem = remove_completed_chapters(chem, input_data.completed_chem_chapters)
|
| 120 |
maths = remove_completed_chapters(maths, input_data.completed_maths_chapters)
|
| 121 |
-
|
| 122 |
# Get topics within timeframe
|
| 123 |
-
physics_topics = get_topics_within_timeframe(phy,
|
| 124 |
-
chemistry_topics = get_topics_within_timeframe(chem,
|
| 125 |
-
mathematics_topics = get_topics_within_timeframe(maths,
|
| 126 |
|
| 127 |
for topic in reversed(input_data.userleft_topic_phy):
|
| 128 |
physics_topics.insert(0, topic)
|
|
|
|
| 16 |
new_topic_approach: str
|
| 17 |
old_topic_approach: str
|
| 18 |
topic_ratio: str
|
| 19 |
+
hours_of_study: str
|
| 20 |
+
hours_of_study_weekends: str
|
| 21 |
revision_days: str
|
| 22 |
test_days: str
|
| 23 |
class_std: str
|
|
|
|
| 24 |
completed_phy_chapters: List[str]
|
| 25 |
completed_chem_chapters: List[str]
|
| 26 |
completed_maths_chapters: List[str]
|
|
|
|
| 30 |
userleft_topic_phy: List[dict]
|
| 31 |
userleft_topic_chem: List[dict]
|
| 32 |
userleft_topic_maths: List[dict]
|
|
|
|
| 33 |
|
| 34 |
output_structure = """
|
| 35 |
{
|
|
|
|
| 116 |
phy = remove_completed_chapters(phy, input_data.completed_phy_chapters)
|
| 117 |
chem = remove_completed_chapters(chem, input_data.completed_chem_chapters)
|
| 118 |
maths = remove_completed_chapters(maths, input_data.completed_maths_chapters)
|
| 119 |
+
total_time=10;
|
| 120 |
# Get topics within timeframe
|
| 121 |
+
physics_topics = get_topics_within_timeframe(phy, total_time, input_data.startphyRoadmapFrom)
|
| 122 |
+
chemistry_topics = get_topics_within_timeframe(chem, total_time, input_data.startchemRoadmapFrom)
|
| 123 |
+
mathematics_topics = get_topics_within_timeframe(maths, total_time, input_data.startmathRoadmapFrom)
|
| 124 |
|
| 125 |
for topic in reversed(input_data.userleft_topic_phy):
|
| 126 |
physics_topics.insert(0, topic)
|