Romeo David commited on
Commit
cb73b2f
·
1 Parent(s): c812c28

Update error message in get_analyst_response for clarity and comment out marketplace data retrieval in output.py

Browse files
Files changed (2) hide show
  1. helper/data_field.py +1 -1
  2. pages/output.py +6 -0
helper/data_field.py CHANGED
@@ -21,7 +21,7 @@ def get_analyst_response(data_src):
21
  if x and "result" in x:
22
  return x["result"]
23
  else:
24
- print(f"No matching document or 'result' field found for data_src: {data_src} in df_response")
25
  return None # Return None if no doc or 'result' field found
26
  finally:
27
  if myclient:
 
21
  if x and "result" in x:
22
  return x["result"]
23
  else:
24
+ print(f"No matching document or 'result' field found for data_src: {data_src} in df_response. 404")
25
  return None # Return None if no doc or 'result' field found
26
  finally:
27
  if myclient:
pages/output.py CHANGED
@@ -205,6 +205,12 @@ Regardless, it is still a great channel worth investing to improve a business’
205
 
206
  st.markdown("---")
207
 
 
 
 
 
 
 
208
  if st.button("Back to Dashboard"):
209
  st.switch_page("pages/home.py")
210
  display_outputs()
 
205
 
206
  st.markdown("---")
207
 
208
+ # if not ("404" in get_analyst_response("Marketplace Analyst")):
209
+ # st.markdown("### MARKET PLACE")
210
+ # marketpalce_data = get_analyst_response("Marketplace Analyst")
211
+ # write_table(marketpalce_data)
212
+
213
+
214
  if st.button("Back to Dashboard"):
215
  st.switch_page("pages/home.py")
216
  display_outputs()