Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,32 +4,68 @@ from pipeline import process_answers_pipeline # Import the centralized pipeline
|
|
| 4 |
from questions import questions # Import questions list
|
| 5 |
|
| 6 |
def process_answers(
|
| 7 |
-
sleep
|
| 8 |
-
exercise
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
):
|
| 18 |
-
#
|
| 19 |
responses = {
|
| 20 |
questions[0]: sleep,
|
| 21 |
questions[1]: exercise,
|
| 22 |
-
questions[2]:
|
| 23 |
-
questions[3]:
|
| 24 |
-
questions[4]:
|
| 25 |
-
questions[5]:
|
| 26 |
-
questions[6]:
|
| 27 |
-
questions[7]:
|
| 28 |
-
questions[8]:
|
| 29 |
-
questions[9]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
-
#
|
| 33 |
results = process_answers_pipeline(responses)
|
| 34 |
|
| 35 |
# Format outputs using results from the pipeline
|
|
|
|
| 4 |
from questions import questions # Import questions list
|
| 5 |
|
| 6 |
def process_answers(
|
| 7 |
+
sleep,
|
| 8 |
+
exercise,
|
| 9 |
+
mood,
|
| 10 |
+
stress_level,
|
| 11 |
+
wellness_goals,
|
| 12 |
+
dietary_restrictions,
|
| 13 |
+
eating_habits,
|
| 14 |
+
relaxation_time,
|
| 15 |
+
health_issues,
|
| 16 |
+
stress_management,
|
| 17 |
+
daily_routine,
|
| 18 |
+
bedtime_routine,
|
| 19 |
+
water_intake,
|
| 20 |
+
mindfulness_frequency,
|
| 21 |
+
mindset,
|
| 22 |
+
personal_growth_reflection,
|
| 23 |
+
break_frequency,
|
| 24 |
+
relaxation_activities,
|
| 25 |
+
self_care_time,
|
| 26 |
+
outdoor_activity_frequency,
|
| 27 |
+
gratitude_practice,
|
| 28 |
+
home_cooked_meals,
|
| 29 |
+
uninterrupted_sleep,
|
| 30 |
+
gratitude_feelings,
|
| 31 |
+
connection_rating,
|
| 32 |
+
activity_tracking,
|
| 33 |
+
strength_training,
|
| 34 |
+
energy_rating
|
| 35 |
):
|
| 36 |
+
# Explicit mapping of responses to corresponding questions
|
| 37 |
responses = {
|
| 38 |
questions[0]: sleep,
|
| 39 |
questions[1]: exercise,
|
| 40 |
+
questions[2]: mood,
|
| 41 |
+
questions[3]: stress_level,
|
| 42 |
+
questions[4]: wellness_goals,
|
| 43 |
+
questions[5]: dietary_restrictions,
|
| 44 |
+
questions[6]: eating_habits,
|
| 45 |
+
questions[7]: relaxation_time,
|
| 46 |
+
questions[8]: health_issues,
|
| 47 |
+
questions[9]: stress_management,
|
| 48 |
+
questions[10]: daily_routine,
|
| 49 |
+
questions[11]: bedtime_routine,
|
| 50 |
+
questions[12]: water_intake,
|
| 51 |
+
questions[13]: mindfulness_frequency,
|
| 52 |
+
questions[14]: mindset,
|
| 53 |
+
questions[15]: personal_growth_reflection,
|
| 54 |
+
questions[16]: break_frequency,
|
| 55 |
+
questions[17]: relaxation_activities,
|
| 56 |
+
questions[18]: self_care_time,
|
| 57 |
+
questions[19]: outdoor_activity_frequency,
|
| 58 |
+
questions[20]: gratitude_practice,
|
| 59 |
+
questions[21]: home_cooked_meals,
|
| 60 |
+
questions[22]: uninterrupted_sleep,
|
| 61 |
+
questions[23]: gratitude_feelings,
|
| 62 |
+
questions[24]: connection_rating,
|
| 63 |
+
questions[25]: activity_tracking,
|
| 64 |
+
questions[26]: strength_training,
|
| 65 |
+
questions[27]: energy_rating
|
| 66 |
}
|
| 67 |
|
| 68 |
+
# Process responses using the centralized pipeline
|
| 69 |
results = process_answers_pipeline(responses)
|
| 70 |
|
| 71 |
# Format outputs using results from the pipeline
|