timeki commited on
Commit
3fa35bf
·
1 Parent(s): 7ea3b8d

change local examples

Browse files
app.py CHANGED
@@ -126,7 +126,7 @@ def cqa_tab(tab_name):
126
  with gr.Tabs(elem_id="right_panel_tab") as tabs:
127
  # Examples tab
128
  with gr.TabItem("Examples", elem_id="tab-examples", id=0):
129
- examples_hidden = create_examples_tab()
130
 
131
  # Sources tab
132
  with gr.Tab("Sources", elem_id="tab-sources", id=1) as tab_sources:
 
126
  with gr.Tabs(elem_id="right_panel_tab") as tabs:
127
  # Examples tab
128
  with gr.TabItem("Examples", elem_id="tab-examples", id=0):
129
+ examples_hidden = create_examples_tab(tab_name)
130
 
131
  # Sources tab
132
  with gr.Tab("Sources", elem_id="tab-sources", id=1) as tab_sources:
climateqa/sample_questions.py CHANGED
@@ -101,4 +101,17 @@ 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
+ QUESTIONS_POC = {
106
+ "Popular Questions": [
107
+ "Comment le changement climatique va impacter les parisiens ?",
108
+ "Qu'est ce qui est mis en place à Paris pour lutter contre le changement climatique ?",
109
+ """Quelle est la différence entre l'adaptation et l'atténuation ?""",
110
+ """Qui est responsable de l'adaptation au changement climatique ?""",
111
+ """Quelles sont les "mesures sans regret" pour l'adaptation ?""",
112
+ """Quelles sont les "mesures sans regret" pour l'adaptation qui pourraient être mise en œuvre à Paris ?""",
113
+ "Comment évalue-t-on les vulnérabilités et les risques climatiques à Paris ?",
114
+ "A Paris, quels sont les impacts du changement climatique sur la ressource en eau ?",
115
+ "Quels sont les impacts du changement climatique sur la biodiversité à Paris ?",
116
+ ],
117
  }
front/tabs/tab_examples.py CHANGED
@@ -1,9 +1,10 @@
1
  import gradio as gr
2
- from climateqa.sample_questions import QUESTIONS
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(),