Commit
·
2083f73
1
Parent(s):
e05ddac
Update app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
import streamlit as st
|
2 |
-
|
3 |
-
|
4 |
|
5 |
|
6 |
-
|
7 |
-
|
8 |
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
|
18 |
# @st.cache_resource
|
|
|
1 |
import streamlit as st
|
2 |
+
import torch
|
3 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
4 |
|
5 |
|
6 |
+
def combine_title_summary(title, summary):
|
7 |
+
return "title: " + title + " summary: " + summary
|
8 |
|
9 |
|
10 |
+
tag2ind = {
|
11 |
+
"bio": 0,
|
12 |
+
"physics": 1,
|
13 |
+
"math": 2,
|
14 |
+
"cs": 3,
|
15 |
+
}
|
16 |
|
17 |
|
18 |
# @st.cache_resource
|