Spaces:
Sleeping
Sleeping
Update app_web.py
Browse files252 unmodified lines253254255256257258259260261262263264265266267252 unmodified linesresolution_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."if qinit_result.get("country", None)[0] not in APPROVED_OPTIONS.get('countries'):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 \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."""if qinit_result.get("value_chain", None)[0] not in APPROVED_OPTIONS.get('value_chains'):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 \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."""if qinit_result.get("investment", None)[0] not in APPROVED_OPTIONS.get('investments'):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 \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."""if qinit_result.get("country", None)[0] in APPROVED_OPTIONS.get('countries') and (qinit_result.get("value_chain", None)[0] in APPROVED_OPTIONS.get('value_chains') or qinit_result.get("investment", None)[0] in APPROVED_OPTIONS.get('investments')):252 unmodified lines253254255256257258259260261262263264265266267252 unmodified linesresolution_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."if qinit_result.get("country", None)[0] not in APPROVED_OPTIONS.get('countries'):resolution_msg = """It seems you are trying to run a PERI analysis for {qinit_result.get("country", None)[0]}! 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 \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."""if qinit_result.get("value_chain", None)[0] not in APPROVED_OPTIONS.get('value_chains'):resolution_msg = """It seems you are trying to run a PERI analysis for {qinit_result.get("value_chain", None)[0]} in {qinit_result.get("country", None)[0]}! 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 \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."""if qinit_result.get("investment", None)[0] not in APPROVED_OPTIONS.get('investments'):resolution_msg = """It seems you are trying to run a PERI analysis for {qinit_result.get("investment", None)[0]} investemnt in {qinit_result.get("country", None)[0]}! 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 \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."""if qinit_result.get("country", None)[0] in APPROVED_OPTIONS.get('countries') and (qinit_result.get("value_chain", None)[0] in APPROVED_OPTIONS.get('value_chains') or qinit_result.get("investment", None)[0] in APPROVED_OPTIONS.get('investments')):
app_web.py+3-3