Spaces:
Sleeping
Sleeping
Commit ·
706f4dc
0
Parent(s):
Initial commit of AuraClima
Browse files- .gitattributes +3 -0
- .idea/.gitignore +3 -0
- .idea/AuraClima.iml +17 -0
- .idea/inspectionProfiles/Project_Default.xml +12 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/misc.xml +4 -0
- .idea/modules.xml +8 -0
- .idea/vcs.xml +6 -0
- assets/ai_placeholder.png +3 -0
- assets/logo.jpg +3 -0
- assets/mental_health_articles_100.csv +101 -0
- data/Agrofood_co2_emission.csv +0 -0
- data/CO2_Emissions_1960-2018.csv +0 -0
- models/feature_cols2.list +0 -0
- models/model1.keras +3 -0
- models/model2.keras +3 -0
- models/model3.keras +3 -0
- models/scaler1.save +0 -0
- models/scaler3.save +0 -0
- models/scalerX2.save +0 -0
- models/scalerY2.save +0 -0
- requirements.txt +7 -0
- streamlit/config.toml +6 -0
- streamlit_app.py +621 -0
.gitattributes
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
assets/*.png filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
assets/*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
models/*.keras filter=lfs diff=lfs merge=lfs -text
|
.idea/.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Default ignored files
|
| 2 |
+
/shelf/
|
| 3 |
+
/workspace.xml
|
.idea/AuraClima.iml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<module type="PYTHON_MODULE" version="4">
|
| 3 |
+
<component name="NewModuleRootManager">
|
| 4 |
+
<content url="file://$MODULE_DIR$">
|
| 5 |
+
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
| 6 |
+
</content>
|
| 7 |
+
<orderEntry type="inheritedJdk" />
|
| 8 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
| 9 |
+
</component>
|
| 10 |
+
<component name="PyDocumentationSettings">
|
| 11 |
+
<option name="format" value="PLAIN" />
|
| 12 |
+
<option name="myDocStringFormat" value="Plain" />
|
| 13 |
+
</component>
|
| 14 |
+
<component name="TestRunnerService">
|
| 15 |
+
<option name="PROJECT_TEST_RUNNER" value="py.test" />
|
| 16 |
+
</component>
|
| 17 |
+
</module>
|
.idea/inspectionProfiles/Project_Default.xml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<component name="InspectionProjectProfileManager">
|
| 2 |
+
<profile version="1.0">
|
| 3 |
+
<option name="myName" value="Project Default" />
|
| 4 |
+
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
| 5 |
+
<option name="ignoredIdentifiers">
|
| 6 |
+
<list>
|
| 7 |
+
<option value="getters.setters.name.setter" />
|
| 8 |
+
</list>
|
| 9 |
+
</option>
|
| 10 |
+
</inspection_tool>
|
| 11 |
+
</profile>
|
| 12 |
+
</component>
|
.idea/inspectionProfiles/profiles_settings.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<component name="InspectionProjectProfileManager">
|
| 2 |
+
<settings>
|
| 3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
| 4 |
+
<version value="1.0" />
|
| 5 |
+
</settings>
|
| 6 |
+
</component>
|
.idea/misc.xml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (AuraClima)" project-jdk-type="Python SDK" />
|
| 4 |
+
</project>
|
.idea/modules.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="ProjectModuleManager">
|
| 4 |
+
<modules>
|
| 5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/AuraClima.iml" filepath="$PROJECT_DIR$/.idea/AuraClima.iml" />
|
| 6 |
+
</modules>
|
| 7 |
+
</component>
|
| 8 |
+
</project>
|
.idea/vcs.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<project version="4">
|
| 3 |
+
<component name="VcsDirectoryMappings">
|
| 4 |
+
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
| 5 |
+
</component>
|
| 6 |
+
</project>
|
assets/ai_placeholder.png
ADDED
|
Git LFS Details
|
assets/logo.jpg
ADDED
|
Git LFS Details
|
assets/mental_health_articles_100.csv
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
title,content
|
| 2 |
+
Managing Panic Disorder,"Managing Panic Disorder is an important aspect of mental well-being. Individuals experiencing panic disorder may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 3 |
+
Exploring Episodic Acute Stress,"Exploring Episodic Acute Stress is an important aspect of mental well-being. Individuals experiencing episodic acute stress may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 4 |
+
Understanding Atypical Depression,"Understanding Atypical Depression is an important aspect of mental well-being. Individuals experiencing atypical depression may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 5 |
+
Exploring Wellness,"Exploring Wellness is an important aspect of mental well-being. Individuals experiencing wellness may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 6 |
+
Living with Stress,"Living with Stress is an important aspect of mental well-being. Individuals experiencing stress may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 7 |
+
The Truth About Trauma,"The Truth About Trauma is an important aspect of mental well-being. Individuals experiencing trauma may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 8 |
+
Coping with Atypical Depression,"Coping with Atypical Depression is an important aspect of mental well-being. Individuals experiencing atypical depression may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 9 |
+
Coping with Anxiety,"Coping with Anxiety is an important aspect of mental well-being. Individuals experiencing anxiety may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 10 |
+
Healing from Panic Disorder,"Healing from Panic Disorder is an important aspect of mental well-being. Individuals experiencing panic disorder may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 11 |
+
Overcoming Checking OCD,"Overcoming Checking OCD is an important aspect of mental well-being. Individuals experiencing checking ocd may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 12 |
+
Healing from Wellness,"Healing from Wellness is an important aspect of mental well-being. Individuals experiencing wellness may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 13 |
+
Living with Depression,"Living with Depression is an important aspect of mental well-being. Individuals experiencing depression may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 14 |
+
A Guide to Mindfulness,"A Guide to Mindfulness is an important aspect of mental well-being. Individuals experiencing mindfulness may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 15 |
+
The Truth About Self-Care,"The Truth About Self-Care is an important aspect of mental well-being. Individuals experiencing self-care may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 16 |
+
Exploring OCD,"Exploring OCD is an important aspect of mental well-being. Individuals experiencing ocd may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 17 |
+
Overcoming Anxiety,"Overcoming Anxiety is an important aspect of mental well-being. Individuals experiencing anxiety may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 18 |
+
Healing from OCD,"Healing from OCD is an important aspect of mental well-being. Individuals experiencing ocd may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 19 |
+
Healing from Developmental Trauma,"Healing from Developmental Trauma is an important aspect of mental well-being. Individuals experiencing developmental trauma may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 20 |
+
Understanding Mindfulness,"Understanding Mindfulness is an important aspect of mental well-being. Individuals experiencing mindfulness may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 21 |
+
Understanding Postpartum Depression,"Understanding Postpartum Depression is an important aspect of mental well-being. Individuals experiencing postpartum depression may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 22 |
+
The Truth About Stress,"The Truth About Stress is an important aspect of mental well-being. Individuals experiencing stress may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 23 |
+
A Guide to Anxiety,"A Guide to Anxiety is an important aspect of mental well-being. Individuals experiencing anxiety may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 24 |
+
What to Know About Postpartum Depression,"What to Know About Postpartum Depression is an important aspect of mental well-being. Individuals experiencing postpartum depression may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 25 |
+
Overcoming Developmental Trauma,"Overcoming Developmental Trauma is an important aspect of mental well-being. Individuals experiencing developmental trauma may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 26 |
+
Overcoming Episodic Acute Stress,"Overcoming Episodic Acute Stress is an important aspect of mental well-being. Individuals experiencing episodic acute stress may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 27 |
+
Overcoming Self-Care,"Overcoming Self-Care is an important aspect of mental well-being. Individuals experiencing self-care may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 28 |
+
Managing Therapy,"Managing Therapy is an important aspect of mental well-being. Individuals experiencing therapy may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 29 |
+
A Guide to Complex Trauma,"A Guide to Complex Trauma is an important aspect of mental well-being. Individuals experiencing complex trauma may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 30 |
+
What to Know About Trauma,"What to Know About Trauma is an important aspect of mental well-being. Individuals experiencing trauma may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 31 |
+
Managing Generalized Anxiety Disorder,"Managing Generalized Anxiety Disorder is an important aspect of mental well-being. Individuals experiencing generalized anxiety disorder may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 32 |
+
Overcoming Resilience,"Overcoming Resilience is an important aspect of mental well-being. Individuals experiencing resilience may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 33 |
+
Living with Therapy,"Living with Therapy is an important aspect of mental well-being. Individuals experiencing therapy may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 34 |
+
Living with Generalized Anxiety Disorder,"Living with Generalized Anxiety Disorder is an important aspect of mental well-being. Individuals experiencing generalized anxiety disorder may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 35 |
+
Living with Chronic Stress,"Living with Chronic Stress is an important aspect of mental well-being. Individuals experiencing chronic stress may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 36 |
+
Coping with Developmental Trauma,"Coping with Developmental Trauma is an important aspect of mental well-being. Individuals experiencing developmental trauma may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 37 |
+
Coping with Panic Disorder,"Coping with Panic Disorder is an important aspect of mental well-being. Individuals experiencing panic disorder may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 38 |
+
A Guide to Acute Stress,"A Guide to Acute Stress is an important aspect of mental well-being. Individuals experiencing acute stress may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 39 |
+
The Truth About Developmental Trauma,"The Truth About Developmental Trauma is an important aspect of mental well-being. Individuals experiencing developmental trauma may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 40 |
+
Coping with Self-Care,"Coping with Self-Care is an important aspect of mental well-being. Individuals experiencing self-care may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 41 |
+
Exploring Separation Anxiety,"Exploring Separation Anxiety is an important aspect of mental well-being. Individuals experiencing separation anxiety may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 42 |
+
What to Know About Resilience,"What to Know About Resilience is an important aspect of mental well-being. Individuals experiencing resilience may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 43 |
+
Understanding Checking OCD,"Understanding Checking OCD is an important aspect of mental well-being. Individuals experiencing checking ocd may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 44 |
+
Understanding Major Depressive Disorder,"Understanding Major Depressive Disorder is an important aspect of mental well-being. Individuals experiencing major depressive disorder may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 45 |
+
Exploring Mindfulness,"Exploring Mindfulness is an important aspect of mental well-being. Individuals experiencing mindfulness may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 46 |
+
The Truth About Complex Trauma,"The Truth About Complex Trauma is an important aspect of mental well-being. Individuals experiencing complex trauma may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 47 |
+
What to Know About Stress,"What to Know About Stress is an important aspect of mental well-being. Individuals experiencing stress may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 48 |
+
The Truth About Therapy,"The Truth About Therapy is an important aspect of mental well-being. Individuals experiencing therapy may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 49 |
+
A Guide to Single Event Trauma,"A Guide to Single Event Trauma is an important aspect of mental well-being. Individuals experiencing single event trauma may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 50 |
+
The Truth About Separation Anxiety,"The Truth About Separation Anxiety is an important aspect of mental well-being. Individuals experiencing separation anxiety may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 51 |
+
Exploring Trauma,"Exploring Trauma is an important aspect of mental well-being. Individuals experiencing trauma may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 52 |
+
A Guide to Self-Care,"A Guide to Self-Care is an important aspect of mental well-being. Individuals experiencing self-care may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 53 |
+
What to Know About Single Event Trauma,"What to Know About Single Event Trauma is an important aspect of mental well-being. Individuals experiencing single event trauma may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 54 |
+
Managing Mindfulness,"Managing Mindfulness is an important aspect of mental well-being. Individuals experiencing mindfulness may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 55 |
+
The Truth About Generalized Anxiety Disorder,"The Truth About Generalized Anxiety Disorder is an important aspect of mental well-being. Individuals experiencing generalized anxiety disorder may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 56 |
+
The Truth About Meditation,"The Truth About Meditation is an important aspect of mental well-being. Individuals experiencing meditation may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 57 |
+
Healing from Chronic Stress,"Healing from Chronic Stress is an important aspect of mental well-being. Individuals experiencing chronic stress may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 58 |
+
Managing Self-Care,"Managing Self-Care is an important aspect of mental well-being. Individuals experiencing self-care may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 59 |
+
Healing from Separation Anxiety,"Healing from Separation Anxiety is an important aspect of mental well-being. Individuals experiencing separation anxiety may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 60 |
+
Healing from Meditation,"Healing from Meditation is an important aspect of mental well-being. Individuals experiencing meditation may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 61 |
+
A Guide to Chronic Stress,"A Guide to Chronic Stress is an important aspect of mental well-being. Individuals experiencing chronic stress may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 62 |
+
Healing from Resilience,"Healing from Resilience is an important aspect of mental well-being. Individuals experiencing resilience may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 63 |
+
A Guide to Depression,"A Guide to Depression is an important aspect of mental well-being. Individuals experiencing depression may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 64 |
+
Managing Meditation,"Managing Meditation is an important aspect of mental well-being. Individuals experiencing meditation may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 65 |
+
Coping with Mindfulness,"Coping with Mindfulness is an important aspect of mental well-being. Individuals experiencing mindfulness may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 66 |
+
Overcoming Postpartum Depression,"Overcoming Postpartum Depression is an important aspect of mental well-being. Individuals experiencing postpartum depression may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 67 |
+
Understanding Panic Disorder,"Understanding Panic Disorder is an important aspect of mental well-being. Individuals experiencing panic disorder may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 68 |
+
Overcoming Chronic Stress,"Overcoming Chronic Stress is an important aspect of mental well-being. Individuals experiencing chronic stress may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 69 |
+
Overcoming Therapy,"Overcoming Therapy is an important aspect of mental well-being. Individuals experiencing therapy may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 70 |
+
Living with Symmetry OCD,"Living with Symmetry OCD is an important aspect of mental well-being. Individuals experiencing symmetry ocd may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 71 |
+
Healing from Acute Stress,"Healing from Acute Stress is an important aspect of mental well-being. Individuals experiencing acute stress may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 72 |
+
Living with Separation Anxiety,"Living with Separation Anxiety is an important aspect of mental well-being. Individuals experiencing separation anxiety may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 73 |
+
Coping with OCD,"Coping with OCD is an important aspect of mental well-being. Individuals experiencing ocd may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 74 |
+
A Guide to Resilience,"A Guide to Resilience is an important aspect of mental well-being. Individuals experiencing resilience may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 75 |
+
What to Know About Checking OCD,"What to Know About Checking OCD is an important aspect of mental well-being. Individuals experiencing checking ocd may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 76 |
+
A Guide to Checking OCD,"A Guide to Checking OCD is an important aspect of mental well-being. Individuals experiencing checking ocd may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 77 |
+
A Guide to Symmetry OCD,"A Guide to Symmetry OCD is an important aspect of mental well-being. Individuals experiencing symmetry ocd may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 78 |
+
A Guide to Meditation,"A Guide to Meditation is an important aspect of mental well-being. Individuals experiencing meditation may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 79 |
+
Understanding Chronic Stress,"Understanding Chronic Stress is an important aspect of mental well-being. Individuals experiencing chronic stress may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 80 |
+
Exploring Panic Disorder,"Exploring Panic Disorder is an important aspect of mental well-being. Individuals experiencing panic disorder may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 81 |
+
The Truth About Acute Stress,"The Truth About Acute Stress is an important aspect of mental well-being. Individuals experiencing acute stress may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 82 |
+
Understanding Trauma,"Understanding Trauma is an important aspect of mental well-being. Individuals experiencing trauma may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 83 |
+
Living with Trauma,"Living with Trauma is an important aspect of mental well-being. Individuals experiencing trauma may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 84 |
+
Exploring Major Depressive Disorder,"Exploring Major Depressive Disorder is an important aspect of mental well-being. Individuals experiencing major depressive disorder may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 85 |
+
Overcoming Separation Anxiety,"Overcoming Separation Anxiety is an important aspect of mental well-being. Individuals experiencing separation anxiety may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 86 |
+
Managing Symmetry OCD,"Managing Symmetry OCD is an important aspect of mental well-being. Individuals experiencing symmetry ocd may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 87 |
+
Understanding Developmental Trauma,"Understanding Developmental Trauma is an important aspect of mental well-being. Individuals experiencing developmental trauma may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 88 |
+
A Guide to Wellness,"A Guide to Wellness is an important aspect of mental well-being. Individuals experiencing wellness may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 89 |
+
Healing from Major Depressive Disorder,"Healing from Major Depressive Disorder is an important aspect of mental well-being. Individuals experiencing major depressive disorder may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 90 |
+
Coping with Symmetry OCD,"Coping with Symmetry OCD is an important aspect of mental well-being. Individuals experiencing symmetry ocd may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 91 |
+
Healing from Generalized Anxiety Disorder,"Healing from Generalized Anxiety Disorder is an important aspect of mental well-being. Individuals experiencing generalized anxiety disorder may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 92 |
+
What to Know About Complex Trauma,"What to Know About Complex Trauma is an important aspect of mental well-being. Individuals experiencing complex trauma may benefit from mindfulness, therapy, or medication. Mental health should be prioritized just like physical health."
|
| 93 |
+
Exploring Self-Care,"Exploring Self-Care is an important aspect of mental well-being. Individuals experiencing self-care may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
| 94 |
+
What to Know About Atypical Depression,"What to Know About Atypical Depression is an important aspect of mental well-being. Individuals experiencing atypical depression may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 95 |
+
Managing Depression,"Managing Depression is an important aspect of mental well-being. Individuals experiencing depression may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 96 |
+
Managing Stress,"Managing Stress is an important aspect of mental well-being. Individuals experiencing stress may benefit from mindfulness, therapy, or medication. Recognizing symptoms early can lead to effective recovery paths."
|
| 97 |
+
Exploring Resilience,"Exploring Resilience is an important aspect of mental well-being. Individuals experiencing resilience may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 98 |
+
Coping with Chronic Stress,"Coping with Chronic Stress is an important aspect of mental well-being. Individuals experiencing chronic stress may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 99 |
+
Healing from Atypical Depression,"Healing from Atypical Depression is an important aspect of mental well-being. Individuals experiencing atypical depression may benefit from mindfulness, therapy, or medication. These strategies can improve daily functioning and emotional well-being."
|
| 100 |
+
Managing Trauma,"Managing Trauma is an important aspect of mental well-being. Individuals experiencing trauma may benefit from mindfulness, therapy, or medication. Support, education, and therapy can help individuals lead better lives."
|
| 101 |
+
Exploring Therapy,"Exploring Therapy is an important aspect of mental well-being. Individuals experiencing therapy may benefit from mindfulness, therapy, or medication. Healing is possible with the right guidance and support."
|
data/Agrofood_co2_emission.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/CO2_Emissions_1960-2018.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
models/feature_cols2.list
ADDED
|
Binary file (5.11 kB). View file
|
|
|
models/model1.keras
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5e66e4094025d8a322aa798a768ecb3468405867608c395c5cdf4f5210bc9bf
|
| 3 |
+
size 261445
|
models/model2.keras
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f58a956485180873b18e5b84caa3c20368f39f401afffe7188957ce45163f7b
|
| 3 |
+
size 258594
|
models/model3.keras
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:592a4e750a683ca98b9aa1ab3d9dab41cc677538299dcc82830b6688676090c4
|
| 3 |
+
size 2472674
|
models/scaler1.save
ADDED
|
Binary file (991 Bytes). View file
|
|
|
models/scaler3.save
ADDED
|
Binary file (719 Bytes). View file
|
|
|
models/scalerX2.save
ADDED
|
Binary file (6.95 kB). View file
|
|
|
models/scalerY2.save
ADDED
|
Binary file (623 Bytes). View file
|
|
|
requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
streamlit
|
| 2 |
+
tensorflow
|
| 3 |
+
pandas
|
| 4 |
+
scikit-learn
|
| 5 |
+
joblib
|
| 6 |
+
matplotlib
|
| 7 |
+
numpy
|
streamlit/config.toml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[theme]
|
| 2 |
+
primaryColor = "#1f77b4" # a blue shade
|
| 3 |
+
backgroundColor = "#FFFFFF" # white background
|
| 4 |
+
secondaryBackgroundColor = "#FF7F0E" # orange accent
|
| 5 |
+
textColor = "#000000"
|
| 6 |
+
font = "Helvetica"
|
streamlit_app.py
ADDED
|
@@ -0,0 +1,621 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import tensorflow as tf
|
| 3 |
+
import joblib
|
| 4 |
+
import pandas as pd
|
| 5 |
+
import numpy as np
|
| 6 |
+
import os
|
| 7 |
+
import matplotlib.pyplot as plt
|
| 8 |
+
import pickle
|
| 9 |
+
import plotly.graph_objects as go
|
| 10 |
+
import plotly.express as px
|
| 11 |
+
from plotly.subplots import make_subplots
|
| 12 |
+
|
| 13 |
+
# Dark theme configuration
|
| 14 |
+
st.set_page_config(
|
| 15 |
+
page_title="AuraClima - AI Climate Intelligence",
|
| 16 |
+
page_icon="🌍",
|
| 17 |
+
layout="wide",
|
| 18 |
+
initial_sidebar_state="expanded"
|
| 19 |
+
)
|
| 20 |
+
|
| 21 |
+
# Custom CSS for dark theme and styling
|
| 22 |
+
st.markdown("""
|
| 23 |
+
<style>
|
| 24 |
+
.stApp {
|
| 25 |
+
background: linear-gradient(135deg, #0c1017 0%, #1a1f2e 100%);
|
| 26 |
+
color: #ffffff;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.main-header {
|
| 30 |
+
text-align: center;
|
| 31 |
+
background: linear-gradient(135deg, #1f77b4, #FF7F0E);
|
| 32 |
+
-webkit-background-clip: text;
|
| 33 |
+
-webkit-text-fill-color: transparent;
|
| 34 |
+
background-clip: text;
|
| 35 |
+
font-size: 3.5rem;
|
| 36 |
+
font-weight: 800;
|
| 37 |
+
margin-bottom: 1rem;
|
| 38 |
+
text-shadow: 0 0 30px rgba(31, 119, 180, 0.3);
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
.subtitle {
|
| 42 |
+
text-align: center;
|
| 43 |
+
color: #FF7F0E;
|
| 44 |
+
font-size: 1.5rem;
|
| 45 |
+
font-style: italic;
|
| 46 |
+
margin-bottom: 2rem;
|
| 47 |
+
text-shadow: 0 0 20px rgba(255, 127, 14, 0.2);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.model-card {
|
| 51 |
+
background: linear-gradient(145deg, #1e2530, #2a3441);
|
| 52 |
+
border-radius: 15px;
|
| 53 |
+
padding: 20px;
|
| 54 |
+
margin: 15px 0;
|
| 55 |
+
border: 1px solid rgba(31, 119, 180, 0.3);
|
| 56 |
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
| 57 |
+
backdrop-filter: blur(10px);
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
.metric-container {
|
| 61 |
+
background: linear-gradient(135deg, #1f77b4, #2a9fd6);
|
| 62 |
+
border-radius: 12px;
|
| 63 |
+
padding: 15px;
|
| 64 |
+
text-align: center;
|
| 65 |
+
margin: 10px 0;
|
| 66 |
+
box-shadow: 0 4px 20px rgba(31, 119, 180, 0.4);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.metric-value {
|
| 70 |
+
font-size: 2rem;
|
| 71 |
+
font-weight: bold;
|
| 72 |
+
color: #ffffff;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.metric-label {
|
| 76 |
+
color: #e0e6ed;
|
| 77 |
+
font-size: 0.9rem;
|
| 78 |
+
margin-top: 5px;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.ai-badge {
|
| 82 |
+
background: linear-gradient(45deg, #FF7F0E, #ff9a3c);
|
| 83 |
+
color: white;
|
| 84 |
+
padding: 5px 15px;
|
| 85 |
+
border-radius: 20px;
|
| 86 |
+
font-size: 0.8rem;
|
| 87 |
+
font-weight: bold;
|
| 88 |
+
display: inline-block;
|
| 89 |
+
margin: 5px;
|
| 90 |
+
box-shadow: 0 2px 10px rgba(255, 127, 14, 0.3);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.sidebar .sidebar-content {
|
| 94 |
+
background: linear-gradient(180deg, #1a1f2e, #0c1017);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.stSelectbox > div > div {
|
| 98 |
+
background-color: #2a3441;
|
| 99 |
+
border: 1px solid #1f77b4;
|
| 100 |
+
border-radius: 8px;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.stSlider > div > div {
|
| 104 |
+
background: linear-gradient(90deg, #1f77b4, #FF7F0E);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.stButton > button {
|
| 108 |
+
background: linear-gradient(135deg, #1f77b4, #FF7F0E);
|
| 109 |
+
color: white;
|
| 110 |
+
border: none;
|
| 111 |
+
border-radius: 8px;
|
| 112 |
+
padding: 10px 20px;
|
| 113 |
+
font-weight: bold;
|
| 114 |
+
transition: all 0.3s ease;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.stButton > button:hover {
|
| 118 |
+
transform: translateY(-2px);
|
| 119 |
+
box-shadow: 0 5px 20px rgba(31, 119, 180, 0.4);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.forecast-section {
|
| 123 |
+
background: rgba(31, 119, 180, 0.1);
|
| 124 |
+
border-radius: 15px;
|
| 125 |
+
padding: 20px;
|
| 126 |
+
margin: 20px 0;
|
| 127 |
+
border-left: 4px solid #1f77b4;
|
| 128 |
+
}
|
| 129 |
+
</style>
|
| 130 |
+
""", unsafe_allow_html=True)
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
@st.cache_resource
|
| 134 |
+
def load_all():
|
| 135 |
+
base = os.path.dirname(__file__)
|
| 136 |
+
models_dir = os.path.join(base, "models")
|
| 137 |
+
data_dir = os.path.join(base, "data")
|
| 138 |
+
|
| 139 |
+
# Load models
|
| 140 |
+
model1 = tf.keras.models.load_model(os.path.join(models_dir, "model1.keras"))
|
| 141 |
+
model2 = tf.keras.models.load_model(os.path.join(models_dir, "model2.keras"))
|
| 142 |
+
model3 = tf.keras.models.load_model(os.path.join(models_dir, "model3.keras"))
|
| 143 |
+
|
| 144 |
+
# Load scalers
|
| 145 |
+
scaler1 = joblib.load(os.path.join(models_dir, "scaler1.save"))
|
| 146 |
+
scalerX2 = joblib.load(os.path.join(models_dir, "scalerX2.save"))
|
| 147 |
+
scalerY2 = joblib.load(os.path.join(models_dir, "scalerY2.save"))
|
| 148 |
+
scaler3 = joblib.load(os.path.join(models_dir, "scaler3.save"))
|
| 149 |
+
|
| 150 |
+
# Load feature columns list for model2
|
| 151 |
+
with open(os.path.join(models_dir, "feature_cols2.list"), "rb") as f:
|
| 152 |
+
feature_cols2 = pickle.load(f)
|
| 153 |
+
|
| 154 |
+
# Load CSV data if present
|
| 155 |
+
df_agri = None
|
| 156 |
+
agri_path = os.path.join(data_dir, "Agrofood_co2_emission.csv")
|
| 157 |
+
if os.path.exists(agri_path):
|
| 158 |
+
df_agri = pd.read_csv(agri_path)
|
| 159 |
+
|
| 160 |
+
df_co2 = None
|
| 161 |
+
co2_path = os.path.join(data_dir, "CO2_Emissions_1960-2018.csv")
|
| 162 |
+
if os.path.exists(co2_path):
|
| 163 |
+
df_co2 = pd.read_csv(co2_path)
|
| 164 |
+
if 'Country Name' not in df_co2.columns:
|
| 165 |
+
st.error(f"Expected 'Country Name' in CO2 CSV, found: {df_co2.columns.tolist()}")
|
| 166 |
+
df_co2 = None
|
| 167 |
+
else:
|
| 168 |
+
dummies = pd.get_dummies(df_co2['Country Name'], prefix='Country')
|
| 169 |
+
country_features = dummies.columns.tolist()
|
| 170 |
+
df_co2 = pd.concat([df_co2, dummies], axis=1)
|
| 171 |
+
else:
|
| 172 |
+
country_features = None
|
| 173 |
+
|
| 174 |
+
return {
|
| 175 |
+
"model1": model1, "model2": model2, "model3": model3,
|
| 176 |
+
"scaler1": scaler1, "scalerX2": scalerX2, "scalerY2": scalerY2, "scaler3": scaler3,
|
| 177 |
+
"feature_cols2": feature_cols2, "df_agri": df_agri, "df_co2": df_co2,
|
| 178 |
+
"country_features": country_features,
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
|
| 182 |
+
def forecast_model1(model, scaler, recent_values):
|
| 183 |
+
arr = np.array(recent_values).reshape(-1, 1)
|
| 184 |
+
scaled = scaler.transform(arr).flatten()
|
| 185 |
+
inp = scaled.reshape((1, len(scaled), 1))
|
| 186 |
+
scaled_pred = model.predict(inp, verbose=0)[0, 0]
|
| 187 |
+
pred = scaler.inverse_transform([[scaled_pred]])[0, 0]
|
| 188 |
+
return pred
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
def predict_model2(model, scalerX, scalerY, feature_array):
|
| 192 |
+
X = np.array(feature_array).reshape(1, -1)
|
| 193 |
+
Xs = scalerX.transform(X)
|
| 194 |
+
ys = model.predict(Xs, verbose=0)
|
| 195 |
+
ypred = scalerY.inverse_transform(ys.reshape(-1, 1)).flatten()[0]
|
| 196 |
+
return ypred
|
| 197 |
+
|
| 198 |
+
|
| 199 |
+
def forecast_model3(model, scaler, recent_series, country_vec):
|
| 200 |
+
window = len(recent_series)
|
| 201 |
+
co2_scaled = scaler.transform(np.array(recent_series).reshape(-1, 1)).flatten()
|
| 202 |
+
co2_col = co2_scaled.reshape(window, 1)
|
| 203 |
+
country_mat = np.tile(country_vec.reshape(1, -1), (window, 1))
|
| 204 |
+
seq = np.concatenate([co2_col, country_mat], axis=1)
|
| 205 |
+
inp = seq.reshape(1, window, seq.shape[1])
|
| 206 |
+
ypred_scaled = model.predict(inp, verbose=0).flatten()
|
| 207 |
+
ypred = scaler.inverse_transform(ypred_scaled.reshape(-1, 1)).flatten()
|
| 208 |
+
return ypred
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
def create_animated_metric(label, value, icon="🎯"):
|
| 212 |
+
st.markdown(f"""
|
| 213 |
+
<div class="metric-container">
|
| 214 |
+
<div style="font-size: 1.2rem;">{icon}</div>
|
| 215 |
+
<div class="metric-value">{value}</div>
|
| 216 |
+
<div class="metric-label">{label}</div>
|
| 217 |
+
</div>
|
| 218 |
+
""", unsafe_allow_html=True)
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
def sidebar_nav():
|
| 222 |
+
st.sidebar.markdown("""
|
| 223 |
+
<div style="text-align: center; padding: 20px;">
|
| 224 |
+
<div style="font-size: 4rem;">🌍</div>
|
| 225 |
+
<h1 style="color: #1f77b4; margin: 10px 0;">AuraClima</h1>
|
| 226 |
+
<p style="color: #FF7F0E; font-style: italic; margin-bottom: 20px;">
|
| 227 |
+
"See the unseen, act on the future"
|
| 228 |
+
</p>
|
| 229 |
+
<div class="ai-badge">🤖 AI-Powered</div>
|
| 230 |
+
<div class="ai-badge">⚡ Real-time</div>
|
| 231 |
+
</div>
|
| 232 |
+
""", unsafe_allow_html=True)
|
| 233 |
+
|
| 234 |
+
st.sidebar.markdown("---")
|
| 235 |
+
page = st.sidebar.radio("🚀 Navigate", ["🏠 Home", "🌍 Climate Intelligence", "ℹ️ About"],
|
| 236 |
+
label_visibility="collapsed")
|
| 237 |
+
return page
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
def home_page():
|
| 241 |
+
# Centered title
|
| 242 |
+
st.markdown('<h1 class="main-header">🌍 AuraClima</h1>', unsafe_allow_html=True)
|
| 243 |
+
|
| 244 |
+
# AI Features showcase
|
| 245 |
+
col1, col2, col3 = st.columns(3)
|
| 246 |
+
|
| 247 |
+
with col1:
|
| 248 |
+
st.markdown("""
|
| 249 |
+
<div class="model-card">
|
| 250 |
+
<div style="text-align: center;">
|
| 251 |
+
<div style="font-size: 3rem; margin-bottom: 10px;">🌱</div>
|
| 252 |
+
<h3 style="color: #1f77b4;">Agricultural AI</h3>
|
| 253 |
+
<p style="color: #e0e6ed;">LSTM Time Series Forecasting</p>
|
| 254 |
+
<div class="ai-badge">Neural Network</div>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
""", unsafe_allow_html=True)
|
| 258 |
+
|
| 259 |
+
with col2:
|
| 260 |
+
st.markdown("""
|
| 261 |
+
<div class="model-card">
|
| 262 |
+
<div style="text-align: center;">
|
| 263 |
+
<div style="font-size: 3rem; margin-bottom: 10px;">📊</div>
|
| 264 |
+
<h3 style="color: #FF7F0E;">Feature Analysis</h3>
|
| 265 |
+
<p style="color: #e0e6ed;">Multi-variate Regression</p>
|
| 266 |
+
<div class="ai-badge">Deep Learning</div>
|
| 267 |
+
</div>
|
| 268 |
+
</div>
|
| 269 |
+
""", unsafe_allow_html=True)
|
| 270 |
+
|
| 271 |
+
with col3:
|
| 272 |
+
st.markdown("""
|
| 273 |
+
<div class="model-card">
|
| 274 |
+
<div style="text-align: center;">
|
| 275 |
+
<div style="font-size: 3rem; margin-bottom: 10px;">💨</div>
|
| 276 |
+
<h3 style="color: #1f77b4;">CO₂ Intelligence</h3>
|
| 277 |
+
<p style="color: #e0e6ed;">Sequence-to-Sequence</p>
|
| 278 |
+
<div class="ai-badge">Advanced LSTM</div>
|
| 279 |
+
</div>
|
| 280 |
+
</div>
|
| 281 |
+
""", unsafe_allow_html=True)
|
| 282 |
+
|
| 283 |
+
st.markdown("---")
|
| 284 |
+
|
| 285 |
+
st.markdown("""
|
| 286 |
+
<div style="text-align: center; padding: 30px;">
|
| 287 |
+
<h3 style="color: #1f77b4;">🚀 Advanced AI Climate Modeling</h3>
|
| 288 |
+
<p style="color: #e0e6ed; font-size: 1.1rem; max-width: 600px; margin: 0 auto;">
|
| 289 |
+
Leverage cutting-edge machine learning to forecast climate patterns, emissions, and environmental trends.
|
| 290 |
+
Our AI models process complex data to provide actionable insights for a sustainable future.
|
| 291 |
+
</p>
|
| 292 |
+
</div>
|
| 293 |
+
""", unsafe_allow_html=True)
|
| 294 |
+
|
| 295 |
+
|
| 296 |
+
def create_enhanced_plot(hist_years, series_co2, fut_years, pred3, country):
|
| 297 |
+
# Create subplot with secondary y-axis for better visualization
|
| 298 |
+
fig = make_subplots(
|
| 299 |
+
rows=1, cols=1,
|
| 300 |
+
subplot_titles=[f"🌍 AI Climate Intelligence: {country}"],
|
| 301 |
+
specs=[[{"secondary_y": False}]]
|
| 302 |
+
)
|
| 303 |
+
|
| 304 |
+
# Historical data
|
| 305 |
+
fig.add_trace(
|
| 306 |
+
go.Scatter(
|
| 307 |
+
x=hist_years,
|
| 308 |
+
y=series_co2,
|
| 309 |
+
mode='lines+markers',
|
| 310 |
+
name='Historical Emissions',
|
| 311 |
+
line=dict(color='#1f77b4', width=3),
|
| 312 |
+
marker=dict(size=6, color='#1f77b4'),
|
| 313 |
+
hovertemplate='<b>Year:</b> %{x}<br><b>CO₂:</b> %{y:.2f}<extra></extra>'
|
| 314 |
+
)
|
| 315 |
+
)
|
| 316 |
+
|
| 317 |
+
# Forecast data
|
| 318 |
+
fig.add_trace(
|
| 319 |
+
go.Scatter(
|
| 320 |
+
x=fut_years,
|
| 321 |
+
y=pred3,
|
| 322 |
+
mode='lines+markers',
|
| 323 |
+
name='AI Forecast',
|
| 324 |
+
line=dict(color='#FF7F0E', width=4, dash='dash'),
|
| 325 |
+
marker=dict(size=8, color='#FF7F0E', symbol='diamond'),
|
| 326 |
+
hovertemplate='<b>Year:</b> %{x}<br><b>Predicted CO₂:</b> %{y:.2f}<extra></extra>'
|
| 327 |
+
)
|
| 328 |
+
)
|
| 329 |
+
|
| 330 |
+
# Connection line
|
| 331 |
+
fig.add_trace(
|
| 332 |
+
go.Scatter(
|
| 333 |
+
x=[hist_years[-1], fut_years[0]],
|
| 334 |
+
y=[series_co2[-1], pred3[0]],
|
| 335 |
+
mode='lines',
|
| 336 |
+
name='Transition',
|
| 337 |
+
line=dict(color='#2ca02c', width=2, dash='dot'),
|
| 338 |
+
showlegend=False
|
| 339 |
+
)
|
| 340 |
+
)
|
| 341 |
+
|
| 342 |
+
# Update layout with dark theme
|
| 343 |
+
fig.update_layout(
|
| 344 |
+
title=dict(
|
| 345 |
+
text=f"<b>CO₂ Emissions Forecast for {country}</b>",
|
| 346 |
+
x=0.5,
|
| 347 |
+
font=dict(size=18, color='white')
|
| 348 |
+
),
|
| 349 |
+
xaxis_title="Year",
|
| 350 |
+
yaxis_title="CO₂ Emissions",
|
| 351 |
+
plot_bgcolor='rgba(0,0,0,0)',
|
| 352 |
+
paper_bgcolor='rgba(0,0,0,0)',
|
| 353 |
+
font=dict(color='white'),
|
| 354 |
+
legend=dict(
|
| 355 |
+
bgcolor='rgba(30, 37, 48, 0.8)',
|
| 356 |
+
bordercolor='#1f77b4',
|
| 357 |
+
borderwidth=1
|
| 358 |
+
),
|
| 359 |
+
hovermode='x unified'
|
| 360 |
+
)
|
| 361 |
+
|
| 362 |
+
# Update axes
|
| 363 |
+
fig.update_xaxes(
|
| 364 |
+
gridcolor='rgba(31, 119, 180, 0.2)',
|
| 365 |
+
griddash='dash',
|
| 366 |
+
showgrid=True
|
| 367 |
+
)
|
| 368 |
+
fig.update_yaxes(
|
| 369 |
+
gridcolor='rgba(31, 119, 180, 0.2)',
|
| 370 |
+
griddash='dash',
|
| 371 |
+
showgrid=True
|
| 372 |
+
)
|
| 373 |
+
|
| 374 |
+
return fig
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
def forecast_by_country(data):
|
| 378 |
+
st.markdown('<h2 style="color: #1f77b4; text-align: center;">🌍 Climate Intelligence Dashboard</h2>',
|
| 379 |
+
unsafe_allow_html=True)
|
| 380 |
+
|
| 381 |
+
model1, scaler1 = data["model1"], data["scaler1"]
|
| 382 |
+
model2, scalerX2, scalerY2, feature_cols2 = data["model2"], data["scalerX2"], data["scalerY2"], data[
|
| 383 |
+
"feature_cols2"]
|
| 384 |
+
model3, scaler3 = data["model3"], data["scaler3"]
|
| 385 |
+
df_agri, df_co2 = data["df_agri"], data["df_co2"]
|
| 386 |
+
|
| 387 |
+
if df_agri is None:
|
| 388 |
+
st.error("🚨 Agricultural dataset not found. Climate Intelligence unavailable.")
|
| 389 |
+
return
|
| 390 |
+
|
| 391 |
+
countries = sorted(df_agri['Area'].dropna().unique())
|
| 392 |
+
|
| 393 |
+
# Enhanced country selector
|
| 394 |
+
st.markdown("""
|
| 395 |
+
<div style="text-align: center; margin: 20px 0;">
|
| 396 |
+
<h4 style="color: #FF7F0E;">🎯 Select Country for AI Analysis</h4>
|
| 397 |
+
</div>
|
| 398 |
+
""", unsafe_allow_html=True)
|
| 399 |
+
|
| 400 |
+
country = st.selectbox("", countries, label_visibility="collapsed")
|
| 401 |
+
|
| 402 |
+
if not country:
|
| 403 |
+
return
|
| 404 |
+
|
| 405 |
+
df_ct = df_agri[df_agri['Area'] == country].sort_values('Year')
|
| 406 |
+
latest_year = int(df_ct['Year'].max())
|
| 407 |
+
|
| 408 |
+
# Create three columns for models
|
| 409 |
+
st.markdown("---")
|
| 410 |
+
st.markdown('<h3 style="color: #1f77b4; text-align: center;">🤖 AI Model Predictions</h3>', unsafe_allow_html=True)
|
| 411 |
+
|
| 412 |
+
col1, col2, col3 = st.columns(3)
|
| 413 |
+
|
| 414 |
+
# Model 1 - LSTM Forecast
|
| 415 |
+
with col1:
|
| 416 |
+
st.markdown("""
|
| 417 |
+
<div class="forecast-section">
|
| 418 |
+
<h4 style="color: #1f77b4;">🌱 LSTM Time Series</h4>
|
| 419 |
+
<p style="color: #e0e6ed; font-size: 0.9rem;">Neural network analyzing temporal patterns</p>
|
| 420 |
+
</div>
|
| 421 |
+
""", unsafe_allow_html=True)
|
| 422 |
+
|
| 423 |
+
inp1 = model1.input_shape
|
| 424 |
+
window1 = inp1[1]
|
| 425 |
+
series1 = df_ct.set_index('Year')['total_emission']
|
| 426 |
+
years1 = sorted(series1.index)
|
| 427 |
+
|
| 428 |
+
if len(years1) >= window1:
|
| 429 |
+
recent_vals = series1.loc[years1[-window1:]].values
|
| 430 |
+
with st.spinner("🔄 AI Processing..."):
|
| 431 |
+
pred1 = forecast_model1(model1, scaler1, recent_vals)
|
| 432 |
+
create_animated_metric("Next Year Emission", f"{pred1:.2f}", "🌱")
|
| 433 |
+
else:
|
| 434 |
+
st.info(f"⚠️ Need ≥{window1} years of data")
|
| 435 |
+
|
| 436 |
+
# Model 2 - Feature Analysis
|
| 437 |
+
with col2:
|
| 438 |
+
st.markdown("""
|
| 439 |
+
<div class="forecast-section">
|
| 440 |
+
<h4 style="color: #FF7F0E;">📊 Feature Analysis</h4>
|
| 441 |
+
<p style="color: #e0e6ed; font-size: 0.9rem;">Multi-variate regression modeling</p>
|
| 442 |
+
</div>
|
| 443 |
+
""", unsafe_allow_html=True)
|
| 444 |
+
|
| 445 |
+
row_latest = df_ct[df_ct['Year'] == latest_year].iloc[0]
|
| 446 |
+
feature_array = []
|
| 447 |
+
for col in feature_cols2:
|
| 448 |
+
if col.startswith("Area_"):
|
| 449 |
+
feature_array.append(1.0 if col == f"Area_{country}" else 0.0)
|
| 450 |
+
else:
|
| 451 |
+
val = row_latest.get(col, 0.0)
|
| 452 |
+
feature_array.append(float(val))
|
| 453 |
+
|
| 454 |
+
try:
|
| 455 |
+
with st.spinner("🔄 Analyzing features..."):
|
| 456 |
+
pred2 = predict_model2(model2, scalerX2, scalerY2, feature_array)
|
| 457 |
+
create_animated_metric("Feature Prediction", f"{pred2:.2f}", "📊")
|
| 458 |
+
except Exception as e:
|
| 459 |
+
st.error(f"❌ Model error: {e}")
|
| 460 |
+
|
| 461 |
+
# Model 3 - CO2 Intelligence
|
| 462 |
+
with col3:
|
| 463 |
+
st.markdown("""
|
| 464 |
+
<div class="forecast-section">
|
| 465 |
+
<h4 style="color: #1f77b4;">💨 CO₂ Intelligence</h4>
|
| 466 |
+
<p style="color: #e0e6ed; font-size: 0.9rem;">Advanced sequence modeling</p>
|
| 467 |
+
</div>
|
| 468 |
+
""", unsafe_allow_html=True)
|
| 469 |
+
|
| 470 |
+
if df_co2 is not None:
|
| 471 |
+
dfc = df_co2[df_co2['Country Name'] == country]
|
| 472 |
+
country_features = data["country_features"]
|
| 473 |
+
country_vec = np.zeros(len(country_features))
|
| 474 |
+
|
| 475 |
+
for i, name in enumerate(country_features):
|
| 476 |
+
if name == f"Country_{country}":
|
| 477 |
+
country_vec[i] = 1
|
| 478 |
+
break
|
| 479 |
+
|
| 480 |
+
if not dfc.empty:
|
| 481 |
+
year_cols = [c for c in dfc.columns if c.isdigit()]
|
| 482 |
+
series_co2 = dfc.iloc[0][year_cols].astype(float).values
|
| 483 |
+
inp3 = model3.input_shape
|
| 484 |
+
window3 = inp3[1]
|
| 485 |
+
|
| 486 |
+
if len(series_co2) >= window3:
|
| 487 |
+
recent3 = series_co2[-window3:]
|
| 488 |
+
with st.spinner("🔄 CO₂ forecasting..."):
|
| 489 |
+
pred3 = forecast_model3(model3, scaler3, recent3, country_vec)
|
| 490 |
+
|
| 491 |
+
avg_forecast = np.mean(pred3)
|
| 492 |
+
create_animated_metric("Avg CO₂ Forecast", f"{avg_forecast:.2f}", "💨")
|
| 493 |
+
else:
|
| 494 |
+
st.info(f"⚠️ Need ≥{window3} years")
|
| 495 |
+
else:
|
| 496 |
+
st.error("❌ CO₂ data unavailable")
|
| 497 |
+
|
| 498 |
+
# Interactive Parameter Tuning
|
| 499 |
+
st.markdown("---")
|
| 500 |
+
st.markdown('<h3 style="color: #FF7F0E; text-align: center;">⚙️ Interactive Parameter Tuning</h3>',
|
| 501 |
+
unsafe_allow_html=True)
|
| 502 |
+
|
| 503 |
+
with st.expander("🎛️ Adjust Model Parameters", expanded=False):
|
| 504 |
+
st.markdown("**Modify features to explore different scenarios:**")
|
| 505 |
+
|
| 506 |
+
tweaked = []
|
| 507 |
+
cols_numeric = [c for c in feature_cols2 if not c.startswith("Area_")]
|
| 508 |
+
|
| 509 |
+
cols = st.columns(2)
|
| 510 |
+
for i, col in enumerate(feature_cols2):
|
| 511 |
+
if col.startswith("Area_"):
|
| 512 |
+
tweaked.append(feature_array[i])
|
| 513 |
+
else:
|
| 514 |
+
series_col = df_agri[col].dropna().astype(float)
|
| 515 |
+
if not series_col.empty:
|
| 516 |
+
mn, mx = float(series_col.min()), float(series_col.max())
|
| 517 |
+
default = feature_array[i]
|
| 518 |
+
slider_val = cols[i % 2].slider(f"🔧 {col}", mn, mx, default, key=f"slider_{col}")
|
| 519 |
+
tweaked.append(slider_val)
|
| 520 |
+
else:
|
| 521 |
+
tweaked.append(feature_array[i])
|
| 522 |
+
|
| 523 |
+
if st.button("🚀 Run Enhanced Prediction"):
|
| 524 |
+
try:
|
| 525 |
+
with st.spinner("🤖 AI recalculating..."):
|
| 526 |
+
pred2b = predict_model2(model2, scalerX2, scalerY2, tweaked)
|
| 527 |
+
create_animated_metric("Adjusted Prediction", f"{pred2b:.2f}", "🎯")
|
| 528 |
+
except Exception as e:
|
| 529 |
+
st.error(f"❌ Error: {e}")
|
| 530 |
+
|
| 531 |
+
# Enhanced CO2 Visualization
|
| 532 |
+
if df_co2 is not None and not dfc.empty and len(series_co2) >= window3:
|
| 533 |
+
st.markdown("---")
|
| 534 |
+
st.markdown('<h3 style="color: #1f77b4; text-align: center;">📈 Advanced CO₂ Visualization</h3>',
|
| 535 |
+
unsafe_allow_html=True)
|
| 536 |
+
|
| 537 |
+
hist_years = list(map(int, year_cols))
|
| 538 |
+
last_year = hist_years[-1]
|
| 539 |
+
fut_years = [last_year + i + 1 for i in range(len(pred3))]
|
| 540 |
+
|
| 541 |
+
# Create enhanced interactive plot
|
| 542 |
+
fig = create_enhanced_plot(hist_years, series_co2, fut_years, pred3, country)
|
| 543 |
+
st.plotly_chart(fig, use_container_width=True)
|
| 544 |
+
|
| 545 |
+
# Forecast summary table
|
| 546 |
+
st.markdown('<h4 style="color: #FF7F0E;">📋 Detailed Forecast Summary</h4>', unsafe_allow_html=True)
|
| 547 |
+
forecast_df = pd.DataFrame({
|
| 548 |
+
'🗓️ Year': fut_years,
|
| 549 |
+
'💨 Predicted CO₂': [f"{val:.2f}" for val in pred3],
|
| 550 |
+
'📈 Trend': ['↗️' if i == 0 or pred3[i] > pred3[i - 1] else '↘️' for i in range(len(pred3))]
|
| 551 |
+
})
|
| 552 |
+
st.dataframe(forecast_df, use_container_width=True)
|
| 553 |
+
|
| 554 |
+
|
| 555 |
+
def about_page():
|
| 556 |
+
st.markdown('<h1 class="main-header">🌍 AuraClima</h1>', unsafe_allow_html=True)
|
| 557 |
+
st.markdown('<p class="subtitle">Advanced AI Climate Intelligence Platform</p>', unsafe_allow_html=True)
|
| 558 |
+
|
| 559 |
+
st.markdown("""
|
| 560 |
+
<div class="model-card">
|
| 561 |
+
<h3 style="color: #1f77b4;">🎯 Mission</h3>
|
| 562 |
+
<p style="color: #e0e6ed;">
|
| 563 |
+
AuraClima leverages cutting-edge artificial intelligence to forecast climate patterns and emissions,
|
| 564 |
+
empowering decision-makers to "See the unseen, act on the future."
|
| 565 |
+
</p>
|
| 566 |
+
</div>
|
| 567 |
+
""", unsafe_allow_html=True)
|
| 568 |
+
|
| 569 |
+
col1, col2 = st.columns(2)
|
| 570 |
+
|
| 571 |
+
with col1:
|
| 572 |
+
st.markdown("""
|
| 573 |
+
<div class="model-card">
|
| 574 |
+
<h4 style="color: #FF7F0E;">🤖 Technology Stack</h4>
|
| 575 |
+
<div class="ai-badge">TensorFlow</div>
|
| 576 |
+
<div class="ai-badge">LSTM Networks</div>
|
| 577 |
+
<div class="ai-badge">Neural Networks</div>
|
| 578 |
+
<div class="ai-badge">Time Series</div>
|
| 579 |
+
</div>
|
| 580 |
+
""", unsafe_allow_html=True)
|
| 581 |
+
|
| 582 |
+
with col2:
|
| 583 |
+
st.markdown("""
|
| 584 |
+
<div class="model-card">
|
| 585 |
+
<h4 style="color: #1f77b4;">🎨 Brand Identity</h4>
|
| 586 |
+
<p style="color: #e0e6ed;">
|
| 587 |
+
<strong>Primary:</strong> <span style="color: #1f77b4;">Blue (#1f77b4)</span><br>
|
| 588 |
+
<strong>Secondary:</strong> <span style="color: #FF7F0E;">Orange (#FF7F0E)</span>
|
| 589 |
+
</p>
|
| 590 |
+
</div>
|
| 591 |
+
""", unsafe_allow_html=True)
|
| 592 |
+
|
| 593 |
+
st.markdown("""
|
| 594 |
+
<div style="text-align: center; margin-top: 30px;">
|
| 595 |
+
<p style="color: #e0e6ed;">
|
| 596 |
+
<strong>Developed by:</strong> Abdullah Imran<br>
|
| 597 |
+
<strong>Contact:</strong> abdullahimranarshad@gmail.com
|
| 598 |
+
</p>
|
| 599 |
+
</div>
|
| 600 |
+
""", unsafe_allow_html=True)
|
| 601 |
+
|
| 602 |
+
|
| 603 |
+
# Main Application
|
| 604 |
+
def main():
|
| 605 |
+
# Load resources once
|
| 606 |
+
data = load_all()
|
| 607 |
+
|
| 608 |
+
# Sidebar navigation
|
| 609 |
+
page = sidebar_nav()
|
| 610 |
+
|
| 611 |
+
# Page routing
|
| 612 |
+
if page == "🏠 Home":
|
| 613 |
+
home_page()
|
| 614 |
+
elif page == "🌍 Climate Intelligence":
|
| 615 |
+
forecast_by_country(data)
|
| 616 |
+
elif page == "ℹ️ About":
|
| 617 |
+
about_page()
|
| 618 |
+
|
| 619 |
+
|
| 620 |
+
if __name__ == "__main__":
|
| 621 |
+
main()
|