Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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=
|
| 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=
|
| 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=
|
| 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 |
|