SatAT commited on
Commit
3ddfa0c
·
1 Parent(s): b65b827

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -15,7 +15,7 @@ title = st.text_area("TITLE HERE")
15
  abstract = st.text_area("ABSTRACT HERE")
16
  # ^-- показать текстовое поле. В поле text лежит строка, которая находится там в данный момент
17
 
18
- @st.cache_data
19
  def load_model_and_tokenizer():
20
  tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
21
  model = BertForSequenceClassification.from_pretrained(
@@ -34,22 +34,22 @@ input_ids = tokens['input_ids']
34
  attention_mask = tokens['attention_mask']
35
  logits = model(input_ids, attention_mask)[0]
36
 
37
- tags_names = ['acc-phys',
38
  'adap-org',
39
  "adap-org",
40
- 'alg-geom',
41
- 'astro-ph',
42
- "astro-ph",
43
- 'chao-dyn',
44
- 'chem-ph',
45
  'cmp-lg',
46
  "cmp-lg",
47
  'comp-gas',
48
  'cond-mat',
49
  "cond-mat",
50
- 'cs',
51
  'dg-ga',
52
- 'econ',
53
  'eess',
54
  'funct-an',
55
  'gr-qc',
@@ -62,7 +62,7 @@ tags_names = ['acc-phys',
62
  "hep-ph",
63
  'hep-th',
64
  "hep-th",
65
- 'math',
66
  'math-ph',
67
  'mtrl-th',
68
  'nlin',
@@ -70,14 +70,14 @@ tags_names = ['acc-phys',
70
  'nucl-th',
71
  "nucl-th",
72
  'patt-sol',
73
- 'physics',
74
  'q-alg',
75
- 'q-bio',
76
  'q-fin',
77
  'quant-ph',
78
  "quant-ph",
79
  'solv-int',
80
- 'stat']
81
 
82
  if abstract:
83
  abstract_tokens = tokenizer(abstract, padding=True, truncation=True, return_tensors="pt")
 
15
  abstract = st.text_area("ABSTRACT HERE")
16
  # ^-- показать текстовое поле. В поле text лежит строка, которая находится там в данный момент
17
 
18
+ @st.cache
19
  def load_model_and_tokenizer():
20
  tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
21
  model = BertForSequenceClassification.from_pretrained(
 
34
  attention_mask = tokens['attention_mask']
35
  logits = model(input_ids, attention_mask)[0]
36
 
37
+ tags_names = ['Accelerator Physics',
38
  'adap-org',
39
  "adap-org",
40
+ 'Algebra-Geometry',
41
+ 'Astro-physics',
42
+ "Astro-physics",
43
+ 'Chao-dynamics',
44
+ 'Chemistry-physics',
45
  'cmp-lg',
46
  "cmp-lg",
47
  'comp-gas',
48
  'cond-mat',
49
  "cond-mat",
50
+ 'Computer Science',
51
  'dg-ga',
52
+ 'Economics',
53
  'eess',
54
  'funct-an',
55
  'gr-qc',
 
62
  "hep-ph",
63
  'hep-th',
64
  "hep-th",
65
+ 'Math',
66
  'math-ph',
67
  'mtrl-th',
68
  'nlin',
 
70
  'nucl-th',
71
  "nucl-th",
72
  'patt-sol',
73
+ 'Physics',
74
  'q-alg',
75
+ 'Quantitie-biology',
76
  'q-fin',
77
  'quant-ph',
78
  "quant-ph",
79
  'solv-int',
80
+ 'Statistics']
81
 
82
  if abstract:
83
  abstract_tokens = tokenizer(abstract, padding=True, truncation=True, return_tensors="pt")