Merged main into dev
Browse files- app.py +1 -1
- climateqa/sample_questions.py +14 -0
- front/tabs/tab_examples.py +3 -2
app.py
CHANGED
@@ -129,7 +129,7 @@ def cqa_tab(tab_name):
|
|
129 |
with gr.Tabs(elem_id="right_panel_tab") as tabs:
|
130 |
# Examples tab
|
131 |
with gr.TabItem("Examples", elem_id="tab-examples", id=0):
|
132 |
-
examples_hidden = create_examples_tab()
|
133 |
|
134 |
# Sources tab
|
135 |
with gr.Tab("Sources", elem_id="tab-sources", id=1) as tab_sources:
|
|
|
129 |
with gr.Tabs(elem_id="right_panel_tab") as tabs:
|
130 |
# Examples tab
|
131 |
with gr.TabItem("Examples", elem_id="tab-examples", id=0):
|
132 |
+
examples_hidden = create_examples_tab(tab_name)
|
133 |
|
134 |
# Sources tab
|
135 |
with gr.Tab("Sources", elem_id="tab-sources", id=1) as tab_sources:
|
climateqa/sample_questions.py
CHANGED
@@ -101,4 +101,18 @@ QUESTIONS = {
|
|
101 |
"Is the current technological infrastructure sufficiently advanced and tested to support the implementation of deep-sea mining operations effectively?",
|
102 |
"Provide me with a list of organizations most actively opposing deep-sea mining."
|
103 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
}
|
|
|
101 |
"Is the current technological infrastructure sufficiently advanced and tested to support the implementation of deep-sea mining operations effectively?",
|
102 |
"Provide me with a list of organizations most actively opposing deep-sea mining."
|
103 |
]
|
104 |
+
}
|
105 |
+
|
106 |
+
QUESTIONS_POC = {
|
107 |
+
"Popular Questions": [
|
108 |
+
"Comment le changement climatique va impacter les parisiens ?",
|
109 |
+
"Qu'est ce qui est mis en place à Paris pour lutter contre le changement climatique ?",
|
110 |
+
"""Quelle est la différence entre l'adaptation et l'atténuation ?""",
|
111 |
+
"""Qui est responsable de l'adaptation au changement climatique ?""",
|
112 |
+
"""Quelles sont les "mesures sans regret" pour l'adaptation ?""",
|
113 |
+
"""Quelles sont les "mesures sans regret" pour l'adaptation qui pourraient être mise en œuvre à Paris ?""",
|
114 |
+
"Comment évalue-t-on les vulnérabilités et les risques climatiques à Paris ?",
|
115 |
+
"A Paris, quels sont les impacts du changement climatique sur la ressource en eau ?",
|
116 |
+
"Quels sont les impacts du changement climatique sur la biodiversité à Paris ?",
|
117 |
+
],
|
118 |
}
|
front/tabs/tab_examples.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
-
from climateqa.sample_questions import
|
3 |
|
4 |
|
5 |
-
def create_examples_tab():
|
6 |
examples_hidden = gr.Textbox(visible=False, elem_id=f"examples-hidden")
|
|
|
7 |
first_key = list(QUESTIONS.keys())[0]
|
8 |
dropdown_samples = gr.Dropdown(
|
9 |
choices=QUESTIONS.keys(),
|
|
|
1 |
import gradio as gr
|
2 |
+
from climateqa.sample_questions import QUESTIONS_GLOBAL, QUESTIONS_POC
|
3 |
|
4 |
|
5 |
+
def create_examples_tab(tab_name):
|
6 |
examples_hidden = gr.Textbox(visible=False, elem_id=f"examples-hidden")
|
7 |
+
QUESTIONS = QUESTIONS_POC if tab_name == "Beta - POC Adapt'Action" else QUESTIONS_GLOBAL
|
8 |
first_key = list(QUESTIONS.keys())[0]
|
9 |
dropdown_samples = gr.Dropdown(
|
10 |
choices=QUESTIONS.keys(),
|