TheoLvs commited on
Commit
65b9706
β€’
1 Parent(s): 64c838a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -28
app.py CHANGED
@@ -152,36 +152,56 @@ def log_on_azure(file, logs, share_client):
152
  file_client.upload_file(str(logs))
153
 
154
 
155
- # Gradio
156
- css_code = ".gradio-container {background-image: url('file=background.png');background-position: top right}"
157
- with gr.Blocks(title="🌍 ClimateGPT Ekimetrics", css=css_code) as demo:
158
- user_id_state = gr.State([user_id])
159
 
160
- gr.Markdown("# Welcome to Climate.GPT 🌍 !")
161
- gr.Markdown(
162
- """
163
- Climate change and environmental disruptions have become some of the most pressing challenges facing our planet today. As global temperatures rise and ecosystems suffer, it is essential for individuals to understand the gravity of the situation in order to make informed decisions and advocate for appropriate policy changes.
164
-
165
- However, comprehending the vast and complex scientific information can be daunting, as the scientific consensus references, such as the Intergovernmental Panel on Climate Change (IPCC) reports, span thousands of pages and are often laden with technical jargon. To bridge this gap and make climate science more accessible, we introduce ClimateGPT as a tool to distill expert-level knowledge into easily digestible insights about climate science.
166
-
167
- ClimateGPT harnesses modern OCR techniques to parse and preprocess IPCC reports. By leveraging state-of-the-art question-answering algorithms, ClimateGPT is able to sift through the extensive collection of climate scientific reports and identify relevant passages in response to user inquiries. Furthermore, the integration of the ChatGPT API allows ClimateGPT to present complex data in a user-friendly manner, summarizing key points and facilitating communication of climate science to a wider audience. This innovative chatbot effectively puts a climate expert in your pocket, empowering you to engage with crucial environmental issues in a more informed and meaningful way.
168
- ## How to use Climate GPT
169
-
170
- ### Getting started
171
-
172
- - In the chatbot section, simply type your climate-related question, and ClimateGPT will provide an answer with references to relevant IPCC reports.
173
- - ClimateGPT retrieves specific passages from the IPCC reports to help answer your question accurately.
174
- - Source information, including page numbers and passages, is displayed on the right side of the screen for easy verification.
175
- - Feel free to ask follow-up questions within the chatbot for a more in-depth understanding.
176
- - ClimateGPT integrates multiple sources (IPCC, IPBES, IEA, Limits to Growth, … ) to cover various aspects of environmental science, such as climate change, biodiversity, energy, economy, and pollution. See all sources used below.
177
-
178
- ### Limitations
179
 
180
- - Currently available in English only.
181
- - ⚠️ Please note that, like any AI, the model may occasionally generate an inaccurate or imprecise answer. Always refer to the provided sources to verify the validity of the information given. If you find any issues with the response, kindly provide feedback to help improve the system.
182
- - ClimateGPT is specifically designed for climate-related inquiries. If you ask a non-environmental question, the chatbot will politely remind you that its focus is on climate and environmental issues.
183
  """
184
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  with gr.Row():
186
  with gr.Column(scale=2):
187
  chatbot = gr.Chatbot(elem_id="chatbot")
@@ -287,9 +307,9 @@ ClimateGPT harnesses modern OCR techniques to parse and preprocess IPCC reports.
287
 
288
 
289
  ## Sources
290
-
291
- | IPCC | IPCC AR6 - First Assessment Report on the Physical Science of Climate Change | https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf | 2049 pages | August 2021 |
292
  | --- | --- | --- | --- | --- |
 
293
  | IPCC | IPCC AR6 - Second Assessment Report on Climate Change Adaptation | https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf | 3068 pages | February 2022 |
294
  | IPCC | IPCC AR6 - Third Assessment Report on Climate Change Mitigation | https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf | 2258 pages | April 2022 |
295
  | IPCC | IPCC AR6 - Synthesis Report of the IPCC 6th assessment report (AR6) | https://report.ipcc.ch/ar6syr/pdf/IPCC_AR6_SYR_SPM.pdf | 36 pages | March 2023 |
 
152
  file_client.upload_file(str(logs))
153
 
154
 
155
+ with gr.Blocks(title="🌍 ClimateGPT", css="style.css") as demo:
 
 
 
156
 
157
+ # Gradio
158
+ gr.Markdown("<h1><center>ClimateGPT 🌍</center></h1>")
159
+ gr.Markdown("<h4><center>Ask climate-related questions to the IPCC reports</center></h4>")
160
+ with gr.Row():
161
+ with gr.Column(scale=1):
162
+ gr.Markdown("""
163
+ <p><b>Climate change and environmental disruptions have become some of the most pressing challenges facing our planet today</b>. As global temperatures rise and ecosystems suffer, it is essential for individuals to understand the gravity of the situation in order to make informed decisions and advocate for appropriate policy changes.</p>
164
+ <p>However, comprehending the vast and complex scientific information can be daunting, as the scientific consensus references, such as <b>the Intergovernmental Panel on Climate Change (IPCC) reports, span thousands of pages</b> and are often laden with technical jargon. To bridge this gap and make climate science more accessible, we introduce <b>ClimateGPT as a tool to distill expert-level knowledge into easily digestible insights about climate science.</b></p>
165
+ <div class="tip-box">
166
+ <div class="tip-box-title">
167
+ <span class="light-bulb" role="img" aria-label="Light Bulb">πŸ’‘</span>
168
+ How does ClimateGPT work?
169
+ </div>
170
+ ClimateGPT harnesses modern OCR techniques to parse and preprocess IPCC reports. By leveraging state-of-the-art question-answering algorithms, <i>ClimateGPT is able to sift through the extensive collection of climate scientific reports and identify relevant passages in response to user inquiries</i>. Furthermore, the integration of the ChatGPT API allows ClimateGPT to present complex data in a user-friendly manner, summarizing key points and facilitating communication of climate science to a wider audience. This innovative chatbot effectively puts a climate expert in your pocket, empowering you to engage with crucial environmental issues in a more informed and meaningful way.
171
+ </div>
 
 
 
 
172
 
 
 
 
173
  """
174
  )
175
+
176
+ with gr.Column(scale=1):
177
+ gr.Markdown("![](https://i.postimg.cc/fLvsvMzM/Untitled-design-5.png)")
178
+ gr.Markdown("*Source : IPCC AR6 - Synthesis Report of the IPCC 6th assessment report (AR6)*")
179
+
180
+
181
+ gr.Markdown("## How to use ClimateGPT")
182
+ with gr.Row():
183
+ with gr.Column(scale=1):
184
+ gr.Markdown("""
185
+ ### πŸ’ͺ Getting started
186
+ - In the chatbot section, simply type your climate-related question, and ClimateGPT will provide an answer with references to relevant IPCC reports.
187
+ - ClimateGPT retrieves specific passages from the IPCC reports to help answer your question accurately.
188
+ - Source information, including page numbers and passages, is displayed on the right side of the screen for easy verification.
189
+ - Feel free to ask follow-up questions within the chatbot for a more in-depth understanding.
190
+ - ClimateGPT integrates multiple sources (IPCC, IPBES, IEA, Limits to Growth, … ) to cover various aspects of environmental science, such as climate change, biodiversity, energy, economy, and pollution. See all sources used below.
191
+ """
192
+ )
193
+ with gr.Column(scale=1):
194
+
195
+ gr.Markdown("""
196
+ ### ⚠️ Limitations
197
+ <div class="warning-box">
198
+ <ul>
199
+ <li>Currently available in English only.</li>
200
+ <li>Please note that, like any AI, the model may occasionally generate an inaccurate or imprecise answer. Always refer to the provided sources to verify the validity of the information given. If you find any issues with the response, kindly provide feedback to help improve the system.</li>
201
+ <li>ClimateGPT is specifically designed for climate-related inquiries. If you ask a non-environmental question, the chatbot will politely remind you that its focus is on climate and environmental issues.</li>
202
+ </div>
203
+ """
204
+ )
205
  with gr.Row():
206
  with gr.Column(scale=2):
207
  chatbot = gr.Chatbot(elem_id="chatbot")
 
307
 
308
 
309
  ## Sources
310
+ | Source | Report | URL | Number of pages | Release date |
 
311
  | --- | --- | --- | --- | --- |
312
+ | IPCC | IPCC AR6 - First Assessment Report on the Physical Science of Climate Change | https://report.ipcc.ch/ar6/wg1/IPCC_AR6_WGI_FullReport.pdf | 2049 pages | August 2021 |
313
  | IPCC | IPCC AR6 - Second Assessment Report on Climate Change Adaptation | https://report.ipcc.ch/ar6/wg2/IPCC_AR6_WGII_FullReport.pdf | 3068 pages | February 2022 |
314
  | IPCC | IPCC AR6 - Third Assessment Report on Climate Change Mitigation | https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_FullReport.pdf | 2258 pages | April 2022 |
315
  | IPCC | IPCC AR6 - Synthesis Report of the IPCC 6th assessment report (AR6) | https://report.ipcc.ch/ar6syr/pdf/IPCC_AR6_SYR_SPM.pdf | 36 pages | March 2023 |