1NEYRON1 commited on
Commit
230678a
·
1 Parent(s): dd466f5

Update app.py

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