Nelly-43 commited on
Commit
87e0d5f
·
verified ·
1 Parent(s): f1b3639

Update app_web.py

Browse files
Files changed (1) hide show
  1. app_web.py +8 -8
app_web.py CHANGED
@@ -245,23 +245,23 @@ def render_chat():
245
  }
246
 
247
  if qinit_result.get("country", None)==None:
248
- resolution_msg = f"It seems there is no country specified for the analysis. Currently the PERI framework supports analysis for the countries listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('countries'))}\n\n We are also continuously \
249
- working to expand the framework and you can submit a form if the country you would like to run the analysis on is not included. In the meantime please let me know if you would like to run the anlysis for one of the included countries."
250
 
251
  if qinit_result.get("value_chain", None)==None and qinit_result.get("investment", None)==None:
252
  resolution_msg = f"It seems there is no value chain or investment area specified for the analysis. Please select one of the value chains or investment areas included in the current PERI framework."
253
 
254
  if qinit_result.get("country", None) not in APPROVED_OPTIONS.get('countries'):
255
- resolution_msg = f"It seems you are trying to run a PERI analysis for {qinit_result.get("country", None)}! Currently the PERI framework only supports analysis for the countries listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('countries'))}\n\n We are continuously \
256
- working to expand the framework and you can submit a form to request. In the meantime please let me know if you would like to run the anlysis for one of the included countries."
257
 
258
  if qinit_result.get("value_chain", None) not in APPROVED_OPTIONS.get('value_chains'):
259
- resolution_msg = f"It seems you are trying to run a PERI analysis for {qinit_result.get("value_chain", None)} in {qinit_result.get("country", None)}! Currently the PERI framework only supports analysis for the value chains listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('value_chains'))}\n\n We are continuously \
260
- working to expand the framework and you can submit a form to request. In the meantime please let me know if you would like to run the anlysis for one of the included countries."
261
 
262
  if qinit_result.get("investment", None) not in APPROVED_OPTIONS.get('investments'):
263
- resolution_msg = f"It seems you are trying to run a PERI analysis for {qinit_result.get("investment", None)} investemnt in {qinit_result.get("country", None)}! Currently the PERI framework only supports analysis for the investment areas listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('investments'))}\n\n We are continuously \
264
- working to expand the framework and you can submit a form to request. In the meantime please let me know if you would like to run the anlysis for one of the included countries."
265
 
266
  if qinit_result.get("country", None) in APPROVED_OPTIONS.get('countries') and (qinit_result.get("value_chain", None) in APPROVED_OPTIONS.get('value_chains') or qinit_result.get("investment", None) in APPROVED_OPTIONS.get('investments')):
267
  resolution_msg = f"**Before I search, could you clarify?** Please let me know if you {' and '.join([pillar_dict[c] for c in qcat_result.get('category')])}."
 
245
  }
246
 
247
  if qinit_result.get("country", None)==None:
248
+ resolution_msg = """It seems there is no country specified for the analysis. Currently the PERI framework supports analysis for the countries listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('countries'))}\n\n We are also continuously \
249
+ working to expand the framework and you can submit a form if the country you would like to run the analysis on is not included. In the meantime please let me know if you would like to run the anlysis for one of the included countries."""
250
 
251
  if qinit_result.get("value_chain", None)==None and qinit_result.get("investment", None)==None:
252
  resolution_msg = f"It seems there is no value chain or investment area specified for the analysis. Please select one of the value chains or investment areas included in the current PERI framework."
253
 
254
  if qinit_result.get("country", None) not in APPROVED_OPTIONS.get('countries'):
255
+ resolution_msg = """It seems you are trying to run a PERI analysis for {qinit_result.get("country", None)}! Currently the PERI framework only supports analysis for the countries listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('countries'))}\n\n We are continuously \
256
+ working to expand the framework and you can submit a form to request. In the meantime please let me know if you would like to run the anlysis for one of the included countries."""
257
 
258
  if qinit_result.get("value_chain", None) not in APPROVED_OPTIONS.get('value_chains'):
259
+ resolution_msg = """It seems you are trying to run a PERI analysis for {qinit_result.get("value_chain", None)} in {qinit_result.get("country", None)}! Currently the PERI framework only supports analysis for the value chains listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('value_chains'))}\n\n We are continuously \
260
+ working to expand the framework and you can submit a form to request. In the meantime please let me know if you would like to run the anlysis for one of the included countries."""
261
 
262
  if qinit_result.get("investment", None) not in APPROVED_OPTIONS.get('investments'):
263
+ resolution_msg = """It seems you are trying to run a PERI analysis for {qinit_result.get("investment", None)} investemnt in {qinit_result.get("country", None)}! Currently the PERI framework only supports analysis for the investment areas listed below:\n\n -{'\n -'.join(APPROVED_OPTIONS.get('investments'))}\n\n We are continuously \
264
+ working to expand the framework and you can submit a form to request. In the meantime please let me know if you would like to run the anlysis for one of the included countries."""
265
 
266
  if qinit_result.get("country", None) in APPROVED_OPTIONS.get('countries') and (qinit_result.get("value_chain", None) in APPROVED_OPTIONS.get('value_chains') or qinit_result.get("investment", None) in APPROVED_OPTIONS.get('investments')):
267
  resolution_msg = f"**Before I search, could you clarify?** Please let me know if you {' and '.join([pillar_dict[c] for c in qcat_result.get('category')])}."