Update app.py
Browse files
app.py
CHANGED
@@ -1,146 +1,145 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
3 |
|
4 |
-
id_to_cat = {
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
}
|
144 |
|
145 |
@st.cache_resource
|
146 |
def load_model():
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification
|
3 |
|
4 |
+
id_to_cat = {0: 'High Energy Physics - Theory',
|
5 |
+
1: 'Category Theory',
|
6 |
+
2: 'Methodology',
|
7 |
+
3: 'Formal Languages and Automata Theory',
|
8 |
+
4: 'Robotics',
|
9 |
+
5: 'Fluid Dynamics',
|
10 |
+
6: 'Spectral Theory',
|
11 |
+
7: 'Econometrics',
|
12 |
+
8: 'Programming Languages',
|
13 |
+
9: 'Discrete Mathematics',
|
14 |
+
10: 'Networking and Internet Architecture',
|
15 |
+
11: 'Quantum Gases',
|
16 |
+
12: 'Data Structures and Algorithms',
|
17 |
+
13: 'Databases',
|
18 |
+
14: 'Earth and Planetary Astrophysics',
|
19 |
+
15: 'Optimization and Control',
|
20 |
+
16: 'Biomolecules',
|
21 |
+
17: 'Cryptography and Security',
|
22 |
+
18: 'Geometric Topology',
|
23 |
+
19: 'Other Condensed Matter',
|
24 |
+
20: 'Statistical Mechanics',
|
25 |
+
21: 'Analysis of PDEs',
|
26 |
+
22: 'Quantitative Methods',
|
27 |
+
23: 'Artificial Intelligence',
|
28 |
+
24: 'Classical Analysis and ODEs',
|
29 |
+
25: 'Machine Learning',
|
30 |
+
26: 'Combinatorics',
|
31 |
+
27: 'Pattern Formation and Solitons',
|
32 |
+
28: 'Solar and Stellar Astrophysics',
|
33 |
+
29: 'Audio and Speech Processing',
|
34 |
+
30: 'Computer Science and Game Theory',
|
35 |
+
31: 'Mesoscale and Nanoscale Physics',
|
36 |
+
32: 'Instrumentation and Methods for Astrophysics',
|
37 |
+
33: 'Logic',
|
38 |
+
34: 'General Relativity and Quantum Cosmology',
|
39 |
+
35: 'Differential Geometry',
|
40 |
+
36: 'Graphics',
|
41 |
+
37: 'Logic in Computer Science',
|
42 |
+
38: 'Materials Science',
|
43 |
+
39: 'Computational Finance',
|
44 |
+
40: 'General Literature',
|
45 |
+
41: 'Tissues and Organs',
|
46 |
+
42: 'Digital Libraries',
|
47 |
+
43: 'Sound',
|
48 |
+
44: 'Computational Engineering, Finance, and Science',
|
49 |
+
45: 'Biological Physics',
|
50 |
+
46: 'Algebraic Geometry',
|
51 |
+
47: 'Genomics',
|
52 |
+
48: 'Algebraic Topology',
|
53 |
+
49: 'Mathematical Software',
|
54 |
+
50: 'Cosmology and Nongalactic Astrophysics',
|
55 |
+
51: 'Probability',
|
56 |
+
52: 'Data Analysis, Statistics and Probability',
|
57 |
+
53: 'Classical Physics',
|
58 |
+
54: 'Image and Video Processing',
|
59 |
+
55: 'Neural and Evolutionary Computing',
|
60 |
+
56: 'History and Philosophy of Physics',
|
61 |
+
57: 'Astrophysics of Galaxies',
|
62 |
+
58: 'Molecular Networks',
|
63 |
+
59: 'Cellular Automata and Lattice Gases',
|
64 |
+
60: 'Optics',
|
65 |
+
61: 'General Finance',
|
66 |
+
62: 'Mathematical Physics',
|
67 |
+
63: 'Multimedia',
|
68 |
+
64: 'Computational Physics',
|
69 |
+
65: 'Performance',
|
70 |
+
66: 'History and Overview',
|
71 |
+
67: 'Instrumentation and Detectors',
|
72 |
+
68: 'Computer Vision and Pattern Recognition',
|
73 |
+
69: 'Medical Physics',
|
74 |
+
70: 'Quantum Physics',
|
75 |
+
71: 'Number Theory',
|
76 |
+
72: 'Social and Information Networks',
|
77 |
+
73: 'Populations and Evolution',
|
78 |
+
74: 'High Energy Physics - Lattice',
|
79 |
+
75: 'Pricing of Securities',
|
80 |
+
76: 'Nuclear Theory',
|
81 |
+
77: 'Human-Computer Interaction',
|
82 |
+
78: 'Representation Theory',
|
83 |
+
79: 'Geophysics',
|
84 |
+
80: 'Operator Algebras',
|
85 |
+
81: 'Computational Complexity',
|
86 |
+
82: 'Distributed, Parallel, and Cluster Computing',
|
87 |
+
83: 'Software Engineering',
|
88 |
+
84: 'Computational Geometry',
|
89 |
+
85: 'Cell Behavior',
|
90 |
+
86: 'Quantum Algebra',
|
91 |
+
87: 'Hardware Architecture',
|
92 |
+
88: 'Strongly Correlated Electrons',
|
93 |
+
89: 'Portfolio Management',
|
94 |
+
90: 'General Topology',
|
95 |
+
91: 'Statistical Finance',
|
96 |
+
92: 'Computation and Language',
|
97 |
+
93: 'Atmospheric and Oceanic Physics',
|
98 |
+
94: 'Multiagent Systems',
|
99 |
+
95: 'Rings and Algebras',
|
100 |
+
96: 'Nuclear Experiment',
|
101 |
+
97: 'Space Physics',
|
102 |
+
98: 'Risk Management',
|
103 |
+
99: 'General Mathematics',
|
104 |
+
100: 'Other Statistics',
|
105 |
+
101: 'Symbolic Computation',
|
106 |
+
102: 'High Energy Physics - Phenomenology',
|
107 |
+
103: 'Popular Physics',
|
108 |
+
104: 'Functional Analysis',
|
109 |
+
105: 'Economics',
|
110 |
+
106: 'Computation',
|
111 |
+
107: 'Operating Systems',
|
112 |
+
108: 'Complex Variables',
|
113 |
+
109: 'Applications',
|
114 |
+
110: 'Information Theory',
|
115 |
+
111: 'Physics and Society',
|
116 |
+
112: 'Other Computer Science',
|
117 |
+
113: 'Metric Geometry',
|
118 |
+
114: 'Signal Processing',
|
119 |
+
115: 'Information Retrieval',
|
120 |
+
116: 'Numerical Analysis',
|
121 |
+
117: 'Chemical Physics',
|
122 |
+
118: 'Trading and Market Microstructure',
|
123 |
+
119: 'Soft Condensed Matter',
|
124 |
+
120: 'Computers and Society',
|
125 |
+
121: 'General Physics',
|
126 |
+
122: 'Superconductivity',
|
127 |
+
123: 'Statistics Theory',
|
128 |
+
124: 'Emerging Technologies',
|
129 |
+
125: 'High Energy Astrophysical Phenomena',
|
130 |
+
126: 'Other Quantitative Biology',
|
131 |
+
127: 'High Energy Physics - Experiment',
|
132 |
+
128: 'Commutative Algebra',
|
133 |
+
129: 'Applied Physics',
|
134 |
+
130: 'Dynamical Systems',
|
135 |
+
131: 'Adaptation and Self-Organizing Systems',
|
136 |
+
132: 'Neurons and Cognition',
|
137 |
+
133: 'Subcellular Processes',
|
138 |
+
134: 'Chaotic Dynamics',
|
139 |
+
135: 'Group Theory',
|
140 |
+
136: 'Systems and Control',
|
141 |
+
137: 'Disordered Systems and Neural Networks'
|
142 |
+
}
|
|
|
143 |
|
144 |
@st.cache_resource
|
145 |
def load_model():
|