Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report with AI +prompts #3937

Merged
merged 4 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/spatial/models/report_datafetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ def _generate_prompt(self, audience):
base_info = self._prepare_base_info()
if audience == "researcher":
return (
- f"Generate a comprehensive air quality assessment report for {self.grid_name} for the period of {self.starttime} to {self.endtime}. Begin with a detailed introduction (100-130 words) covering the city's geographical location, climate characteristics, population density, and major pollution sources. "
- f"{base_info} include the period under review."
- f"Daily mean measurements show: {self.daily_mean_data}. "
- f"Diurnal patterns indicate: {self.diurnal}. Monthly trends reveal: {self.monthly_data}. "
f"Diurnal patterns indicate: {self.diurnal}. Monthly trends reveal: {self.monthly_data}. "
+ f"Generate a comprehensive air quality assessment report for {self.grid_name} for the period of {self.starttime} to {self.endtime}. Begin with a detailed introduction (100-130 words) covering the city's geographical location, climate characteristics, population density, and major pollution sources.\n"
+ f"{base_info}\n"
+ f"Daily mean measurements show values ranging from {self.daily_min_pm2_5['pm2_5_calibrated_value']} to {self.daily_max_pm2_5['pm2_5_calibrated_value']} µg/m³.\n"
Expand Down
7 changes: 4 additions & 3 deletions src/spatial/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ geojson~=3.1.0
libpysal~=4.12.1
requests~=2.32.3
python-dotenv~=1.0.1
pandas-gbq
google-cloud-bigquery
google-cloud-storage
google-cloud-bigquery-storage
google-cloud-bigquery[pandas]
gunicorn
flask-cors~=5.0.0
Expand All @@ -21,13 +23,12 @@ shapely~=2.0.6
scikit-learn~=1.5.2
gcsfs~=2024.9.0.post1
joblib~=1.4.2
lightgbm~=4.1.0
numpy~=1.25.2
lightgbm~=4.1.0
numpy
torch
transformers
datasets
sentencepiece
huggingface_hub
google-generativeai
openai
openai
Loading