Skip to content

Commit

Permalink
Merge pull request #3937 from airqo-platform/report-llm-gruming
Browse files Browse the repository at this point in the history
Report with AI +prompts
  • Loading branch information
Baalmart authored Nov 27, 2024
2 parents ccd0756 + 25ec888 commit 481147f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
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

0 comments on commit 481147f

Please sign in to comment.