Spaces:
Runtime error
Runtime error
Commit ·
2ce0e18
1
Parent(s): fa574e6
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ from PIL import Image
|
|
| 9 |
with open('labels.pickle', 'rb') as handle:
|
| 10 |
labels = pickle.load(handle)
|
| 11 |
|
| 12 |
-
|
| 13 |
def predict_topic_by_title_and_abstract(text, model):
|
| 14 |
tokens = tokenizer(text, return_tensors='pt', truncation=True)
|
| 15 |
with torch.no_grad():
|
|
|
|
| 9 |
with open('labels.pickle', 'rb') as handle:
|
| 10 |
labels = pickle.load(handle)
|
| 11 |
|
| 12 |
+
@st.cache
|
| 13 |
def predict_topic_by_title_and_abstract(text, model):
|
| 14 |
tokens = tokenizer(text, return_tensors='pt', truncation=True)
|
| 15 |
with torch.no_grad():
|