From 03e7a63650c030d9b2c898c594da1661009581f9 Mon Sep 17 00:00:00 2001 From: Russell Jarvis <russelljarvis@protonmail.com> Date: Sat, 25 Dec 2021 12:47:37 +1100 Subject: [PATCH] update app --- app.py | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/app.py b/app.py index 30c6ada..a56dda3 100644 --- a/app.py +++ b/app.py @@ -180,29 +180,16 @@ def check_cache(author_name: str, verbose=0): scraped_labels, author_score = frame_to_lists(ar) - try: - ar = call_from_front_end(author_name, tns=30, fast=False) - big_run_done = False - + try: + ar = call_from_front_end(author_name, tns=30, fast=False) + big_run_done = False - scraped_labels, author_score = frame_to_lists(ar) - if len(db.keys()) < 11: - db[author_name] = { - "ar": ar, - "scraped_labels": scraped_labels, - "author_score": author_score, - } + scraped_labels, author_score = frame_to_lists(ar) - #df_author_new, merged_df = data_frames_from_scrape( - # ar, author_name, scraped_labels, author_score, art_df - #) - except: - aliases = semantic_scholar_alias(author_name) - st.warning("Name as typed not found in semantic scholar API") - if len(aliases): - st.markdown("Try one of these alternative name phrasings: {0}".format(aliases)) + except: + pass # st.error("This authors results are hard to fetch and cause technical issues, sorry.") # st.warning("Try this older and more robust version of the app:") # st.warning("https://share.streamlit.io/mcgurrgurr/scienceaccess/app.py") -- GitLab