TheoLvs commited on
Commit
4857c80
1 Parent(s): 78e5850

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +53 -49
app.py CHANGED
@@ -180,30 +180,6 @@ ClimateGPT harnesses modern OCR techniques to parse and preprocess IPCC reports.
180
  gr.Markdown("*Source : IPCC AR6 - Synthesis Report of the IPCC 6th assessment report (AR6)*")
181
 
182
 
183
- gr.Markdown("## How to use ClimateGPT")
184
- with gr.Row():
185
- with gr.Column(scale=1):
186
- gr.Markdown("""
187
- ### 💪 Getting started
188
- - In the chatbot section, simply type your climate-related question, and ClimateGPT will provide an answer with references to relevant IPCC reports.
189
- - ClimateGPT retrieves specific passages from the IPCC reports to help answer your question accurately.
190
- - Source information, including page numbers and passages, is displayed on the right side of the screen for easy verification.
191
- - Feel free to ask follow-up questions within the chatbot for a more in-depth understanding.
192
- - 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.
193
- """
194
- )
195
- with gr.Column(scale=1):
196
-
197
- gr.Markdown("""
198
- ### ⚠️ Limitations
199
- <div class="warning-box">
200
- <ul>
201
- <li>Currently available in English only.</li>
202
- <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>
203
- <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>
204
- </div>
205
- """
206
- )
207
  with gr.Row():
208
  with gr.Column(scale=2):
209
  chatbot = gr.Chatbot(elem_id="chatbot")
@@ -272,35 +248,63 @@ ClimateGPT harnesses modern OCR techniques to parse and preprocess IPCC reports.
272
  )
273
  ask.submit(reset_textbox, [], [ask])
274
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  with gr.Row():
276
  with gr.Column(scale = 1):
277
- with gr.Accordion("🙏 Submit here your feedbacks and feature requests", open=True):
278
- gr.Markdown("""
279
- ## Beta test
280
-
281
- - ClimateGPT welcomes community contributions. To participate, head over to the Community Tab and create a "New Discussion" to ask questions and share your insights.
282
- - Provide feedback through our feedback form, letting us know which insights you found accurate, useful, or not. Your input will help us improve the platform.
283
- - To make climate science accessible to a wider audience, we have opened our own OpenAI API key with a monthly cap of $1000. If you already have an API key, please use it to help conserve bandwidth for others.
284
-
285
- ## Feedbacks
286
- """)
287
 
288
- feedback = gr.Textbox()
289
- feedback_save = gr.Button(value="submit feedback")
290
- # thanks = gr.Textbox()
291
- feedback_save.click(
292
- save_feedback,
293
- inputs=[feedback, user_id_state], # outputs=[thanks]
294
- )
 
 
295
 
296
  with gr.Column(scale = 1):
297
- with gr.Accordion("Add your personal openai api key - Optional (see beta-test section on the right)", open=False):
298
- openai_api_key_textbox = gr.Textbox(
299
- placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
300
- show_label=False,
301
- lines=1,
302
- type="password",
303
- )
 
304
  openai_api_key_textbox.change(
305
  set_openai_api_key, inputs=[openai_api_key_textbox]
306
  )
@@ -341,7 +345,7 @@ Carbon emissions were measured during the development and inference process usin
341
  | Inference | API call to turbo-GPT | x kgCO2 / call | OpenAI |
342
 
343
  ## 📧 Contact
344
- This tool has been developed by the R&D lab at **Ekimetrics**
345
 
346
  If you have any questions or feature requests, please feel free to reach us out at <b>theo.alvesdacosta@ekimetrics.com</b>.
347
  """)
 
180
  gr.Markdown("*Source : IPCC AR6 - Synthesis Report of the IPCC 6th assessment report (AR6)*")
181
 
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  with gr.Row():
184
  with gr.Column(scale=2):
185
  chatbot = gr.Chatbot(elem_id="chatbot")
 
248
  )
249
  ask.submit(reset_textbox, [], [ask])
250
 
251
+ gr.Markdown("## How to use ClimateGPT")
252
+ with gr.Row():
253
+ with gr.Column(scale=1):
254
+ gr.Markdown("""
255
+ ### 💪 Getting started
256
+ - In the chatbot section, simply type your climate-related question, and ClimateGPT will provide an answer with references to relevant IPCC reports.
257
+ - ClimateGPT retrieves specific passages from the IPCC reports to help answer your question accurately.
258
+ - Source information, including page numbers and passages, is displayed on the right side of the screen for easy verification.
259
+ - Feel free to ask follow-up questions within the chatbot for a more in-depth understanding.
260
+ - 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.
261
+ """
262
+ )
263
+ with gr.Column(scale=1):
264
+
265
+ gr.Markdown("""
266
+ ### ⚠️ Limitations
267
+ <div class="warning-box">
268
+ <ul>
269
+ <li>Currently available in English only.</li>
270
+ <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>
271
+ <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>
272
+ </div>
273
+ """
274
+ )
275
+
276
  with gr.Row():
277
  with gr.Column(scale = 1):
278
+ gr.Markdown("## 🙏 Feedback and feature requests")
279
+ gr.Markdown("""
280
+ ### Beta test
281
+
282
+ - ClimateGPT welcomes community contributions. To participate, head over to the Community Tab and create a "New Discussion" to ask questions and share your insights.
283
+ - Provide feedback through our feedback form, letting us know which insights you found accurate, useful, or not. Your input will help us improve the platform.
284
+ - To make climate science accessible to a wider audience, we have opened our own OpenAI API key with a monthly cap of $1000. If you already have an API key, please use it to help conserve bandwidth for others.
285
+
286
+ ### Feedbacks
287
+ """)
288
 
289
+ feedback = gr.Textbox()
290
+ feedback_save = gr.Button(value="submit feedback")
291
+ # thanks = gr.Textbox()
292
+ feedback_save.click(
293
+ save_feedback,
294
+ inputs=[feedback, user_id_state], # outputs=[thanks]
295
+ )
296
+ gr.Markdown("If you need us to ask another climate science document or ask any question, contact us at <b>theo.alvesdacosta@ekimetrics.com</b>")
297
+
298
 
299
  with gr.Column(scale = 1):
300
+ gr.Markdown("## API")
301
+ gr.Accordion("Add your personal openai api key - Optional (see beta-test section on the right)", open=False):
302
+ openai_api_key_textbox = gr.Textbox(
303
+ placeholder="Paste your OpenAI API key (sk-...) and hit Enter",
304
+ show_label=False,
305
+ lines=1,
306
+ type="password",
307
+ )
308
  openai_api_key_textbox.change(
309
  set_openai_api_key, inputs=[openai_api_key_textbox]
310
  )
 
345
  | Inference | API call to turbo-GPT | x kgCO2 / call | OpenAI |
346
 
347
  ## 📧 Contact
348
+ This tool has been developed by the R&D lab at **Ekimetrics** (Jean Lelong, Nina Achache, Gabriel Olympie, Nicolas Chesneau, Natalia De la Calzada, Théo Alves Da Costa)
349
 
350
  If you have any questions or feature requests, please feel free to reach us out at <b>theo.alvesdacosta@ekimetrics.com</b>.
351
  """)