mtyrrell commited on
Commit
8f7a4f3
1 Parent(s): cc8442e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -9
app.py CHANGED
@@ -143,12 +143,33 @@ retriever = EmbeddingRetriever(
143
  progress_bar=False,
144
  )
145
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
 
147
- # Guiding text
148
- st.title('Climate Policy Documents: Vulnerabilities Analysis Q&A')
149
- st.markdown('This tool seeks to provide an interface for quering national climate policy documents (NDCs, LTS etc.). The current version is powered by chatGPT (3.5). The document store is limited to 10 Southern African countries (Angola, Botswana, Eswatini, Lesotho, Malawi, Mozambique, Namibia, South Africa, Zambia, Zimbabwe), as well as Kenya and Rwanda. The intended use case is to allow users to interact with the documents and obtain valuable insights on various vulnerable groups affected by climate change.')
150
- st.markdown('**DISCLAIMER:** *This prototype tool based on LLMs (Language Models) is provided "as is" for experimental and exploratory purposes only, and should not be used for critical or production applications. Users are advised that the tool may contain errors, bugs, or limitations and should be used with caution and awareness of potential risks, and the developers make no warranties or guarantees regarding its performance, reliability, or suitability for any specific purpose.*')
151
-
152
  # Dropdown selectbox: model
153
  # model_sel = st.selectbox('Select an LLM:', model_options)
154
  model_sel = "chatGPT"
@@ -169,11 +190,9 @@ else:
169
  client = InferenceClient()
170
 
171
 
172
- # Dropdown selectbox
173
- country = st.selectbox('Select a country:', country_options)
174
 
175
- # Display the text passages as radio buttons
176
- selected_example = st.radio("Example questions", examples)
177
 
178
  if selected_example == "-":
179
  text = st.text_area('Enter your question in the text box below using natural language or select an example from above:')
@@ -184,3 +203,5 @@ else:
184
  if st.button('Submit'):
185
  run_query(text, country=country, model_sel=model_sel)
186
 
 
 
 
143
  progress_bar=False,
144
  )
145
 
146
+ with st.sidebar:
147
+ # Dropdown selectbox
148
+ country = st.sidebar.selectbox('Select a country:', country_options)
149
+ # choice = st.sidebar.radio(label = 'Select the Document',
150
+ # help = 'You can upload the document \
151
+ # or else you can try a example document',
152
+ # options = ('Upload Document', 'Try Example'),
153
+ # horizontal = True)
154
+
155
+ with st.container():
156
+ st.markdown("<h2 style='text-align: center;'> Climate Policy Documents: Vulnerabilities Analysis Q&A </h2>", unsafe_allow_html=True)
157
+ st.write(' ')
158
+
159
+ with st.expander("ℹ️ - About this app", expanded=False):
160
+ st.write(
161
+ """
162
+ This tool seeks to provide an interface for quering national climate policy documents (NDCs, LTS etc.). The current version is powered by chatGPT (3.5). The document store is limited to 10 Southern African countries (Angola, Botswana, Eswatini, Lesotho, Malawi, Mozambique, Namibia, South Africa, Zambia, Zimbabwe), as well as Kenya and Rwanda. The intended use case is to allow users to interact with the documents and obtain valuable insights on various vulnerable groups affected by climate change.
163
+
164
+ **DISCLAIMER:** *This prototype tool based on LLMs (Language Models) is provided "as is" for experimental and exploratory purposes only, and should not be used for critical or production applications. Users are advised that the tool may contain errors, bugs, or limitations and should be used with caution and awareness of potential risks, and the developers make no warranties or guarantees regarding its performance, reliability, or suitability for any specific purpose.*
165
+ """)
166
+
167
+ # Display the text passages as radio buttons
168
+ selected_example = st.radio("Example questions", examples)
169
+
170
+
171
+
172
 
 
 
 
 
 
173
  # Dropdown selectbox: model
174
  # model_sel = st.selectbox('Select an LLM:', model_options)
175
  model_sel = "chatGPT"
 
190
  client = InferenceClient()
191
 
192
 
 
 
193
 
194
+
195
+
196
 
197
  if selected_example == "-":
198
  text = st.text_area('Enter your question in the text box below using natural language or select an example from above:')
 
203
  if st.button('Submit'):
204
  run_query(text, country=country, model_sel=model_sel)
205
 
206
+
207
+