malteos commited on
Commit
3817748
1 Parent(s): 3cc235f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -55,14 +55,14 @@ tokenizer_name_or_path = f'malteos/aspect-scibert-{aspects[0]}' # any aspect
55
  dataset_config = 'malteos/aspect-paper-metadata'
56
 
57
 
58
- @st.cache(show_spinner=False)
59
  def st_load_model(name_or_path):
60
  with st.spinner(f'Loading the model `{name_or_path}` (this might take a while)...'):
61
  model = AutoModel.from_pretrained(name_or_path)
62
  return model
63
 
64
 
65
- @st.cache(show_spinner=False)
66
  def st_load_dataset(name_or_path):
67
  with st.spinner('Loading the dataset and search index (this might take a while)...'):
68
  dataset = load_dataset(name_or_path)
@@ -85,7 +85,7 @@ aspect_to_model = dict(
85
  dataset = st_load_dataset(dataset_config)
86
 
87
 
88
- @st.cache(show_spinner=False)
89
  def get_paper(doc_id):
90
  res = requests.get(f'https://api.semanticscholar.org/v1/paper/{doc_id}')
91
 
 
55
  dataset_config = 'malteos/aspect-paper-metadata'
56
 
57
 
58
+ @st.cache(show_spinner=True)
59
  def st_load_model(name_or_path):
60
  with st.spinner(f'Loading the model `{name_or_path}` (this might take a while)...'):
61
  model = AutoModel.from_pretrained(name_or_path)
62
  return model
63
 
64
 
65
+ @st.cache(show_spinner=True)
66
  def st_load_dataset(name_or_path):
67
  with st.spinner('Loading the dataset and search index (this might take a while)...'):
68
  dataset = load_dataset(name_or_path)
 
85
  dataset = st_load_dataset(dataset_config)
86
 
87
 
88
+ @st.cache(show_spinner=True)
89
  def get_paper(doc_id):
90
  res = requests.get(f'https://api.semanticscholar.org/v1/paper/{doc_id}')
91