Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,9 @@ from transformers import AutoTokenizer, AutoModel, AutoModelForSequenceClassific
|
|
4 |
from safetensors.torch import load_file as safe_load
|
5 |
|
6 |
target_to_ind = {'cs': 0, 'econ': 1, 'eess': 2, 'math': 3, 'phys': 4, 'q-bio': 5, 'q-fin': 6, 'stat': 7}
|
7 |
-
|
8 |
ind_to_target = {ind: target for target, ind in target_to_ind.items()}
|
9 |
|
|
|
10 |
@st.cache_resource
|
11 |
def load_model_and_tokenizer():
|
12 |
model_name = 'distilbert/distilbert-base-cased'
|
|
|
4 |
from safetensors.torch import load_file as safe_load
|
5 |
|
6 |
target_to_ind = {'cs': 0, 'econ': 1, 'eess': 2, 'math': 3, 'phys': 4, 'q-bio': 5, 'q-fin': 6, 'stat': 7}
|
|
|
7 |
ind_to_target = {ind: target for target, ind in target_to_ind.items()}
|
8 |
|
9 |
+
|
10 |
@st.cache_resource
|
11 |
def load_model_and_tokenizer():
|
12 |
model_name = 'distilbert/distilbert-base-cased'
|