NifulIslam commited on
Commit
9764198
0 Parent(s):

without onnx

Browse files
Files changed (5) hide show
  1. .gitattributes +35 -0
  2. README.md +13 -0
  3. app.py +27 -0
  4. keys_encoded_rev.json +1 -0
  5. requirements.txt +4 -0
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: IEEE Keyword Prediction
3
+ emoji: 😻
4
+ colorFrom: gray
5
+ colorTo: purple
6
+ sdk: gradio
7
+ sdk_version: 3.40.1
8
+ app_file: app.py
9
+ pinned: false
10
+ license: apache-2.0
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import onnxruntime as rt
3
+ from transformers import AutoTokenizer
4
+ import torch, json
5
+
6
+ tokenizer = AutoTokenizer.from_pretrained("distilroberta-base")
7
+
8
+ with open("keys_encoded_rev.json", "r") as fp:
9
+ encode_key_types = json.load(fp)
10
+
11
+ genres = list(encode_key_types.keys())
12
+
13
+ inf_session = rt.InferenceSession('keyword-classifier-quantized.onnx')
14
+ input_name = inf_session.get_inputs()[0].name
15
+ output_name = inf_session.get_outputs()[0].name
16
+
17
+ def classify_book_genre(description):
18
+ input_ids = tokenizer(description)['input_ids'][:512]
19
+ logits = inf_session.run([output_name], {input_name: [input_ids]})[0]
20
+ logits = torch.FloatTensor(logits)
21
+ probs = torch.sigmoid(logits)[0]
22
+ return dict(zip(genres, map(float, probs)))
23
+
24
+ label = gr.outputs.Label(num_top_classes=5)
25
+ iface = gr.Interface(fn=classify_book_genre, inputs="text", outputs=label)
26
+ iface.launch(inline=False)
27
+
keys_encoded_rev.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"Training": 0, "Degradation": 1, "Complexity theory": 2, "Image recognition": 3, "Neural networks": 4, "Visualization": 5, "Image segmentation": 6, "Genetic algorithms": 7, "Computational complexity": 8, "Evolutionary computation": 9, "Computational modeling": 10, "Testing": 11, "Decision making": 12, "Constraint optimization": 13, "Particle swarm optimization": 14, "Birds": 15, "Educational institutions": 16, "Humans": 17, "Optimization methods": 18, "Artificial neural networks": 19, "Performance evaluation": 20, "Computer architecture": 21, "Convolutional codes": 22, "Sparse matrices": 23, "Object detection": 24, "Computer vision": 25, "Microprocessors": 26, "Real-time systems": 27, "Pipelines": 28, "Histograms": 29, "Robustness": 30, "Object recognition": 31, "Support vector machines": 32, "Image edge detection": 33, "Image databases": 34, "Semantics": 35, "Convolution": 36, "Deconvolution": 37, "Adaptation models": 38, "Network architecture": 39, "Proposals": 40, "Feature extraction": 41, "Search problems": 42, "Detectors": 43, "Vectors": 44, "Quantization (signal)": 45, "Machine learning": 46, "Training data": 47, "Data mining": 48, "Space technology": 49, "Machine learning algorithms": 50, "Labeling": 51, "Learning systems": 52, "Computational efficiency": 53, "Benchmark testing": 54, "Solid modeling": 55, "Motion estimation": 56, "Iterative algorithms": 57, "Inspection": 58, "Shape measurement": 59, "Iterative methods": 60, "Convergence": 61, "Fuzzy systems": 62, "Fuzzy neural networks": 63, "Predictive models": 64, "Automatic control": 65, "Adaptive systems": 66, "Nonlinear control systems": 67, "Gray-scale": 68, "Spatial resolution": 69, "Prototypes": 70, "Pattern recognition": 71, "Quantization": 72, "Task analysis": 73, "Wireless communication": 74, "Transmitters": 75, "Receiving antennas": 76, "Fading": 77, "Transmitting antennas": 78, "Bandwidth": 79, "Base stations": 80, "Bit error rate": 81, "Image resolution": 82, "Context": 83, "Entropy": 84, "Interference": 85, "Channel estimation": 86, "Cameras": 87, "Layout": 88, "Closed-form solution": 89, "Maximum likelihood estimation": 90, "Decoding": 91, "Clustering algorithms": 92, "Eigenvalues and eigenfunctions": 93, "Bayesian methods": 94, "Partitioning algorithms": 95, "Lighting": 96, "Neurons": 97, "Computer science": 98, "Filters": 99, "Face recognition": 100, "Face detection": 101, "Principal component analysis": 102, "Pattern classification": 103, "Pixel": 104, "Error analysis": 105, "Image representation": 106, "Focusing": 107, "Skin": 108, "Gaussian distribution": 109, "Biological neural networks": 110, "Manifolds": 111, "Standards": 112, "Gallium nitride": 113, "Generators": 114, "Image analysis": 115, "Brain modeling": 116, "Biological system modeling": 117, "Hardware": 118, "Kernel": 119, "Smoothing methods": 120, "Image color analysis": 121, "Acceleration": 122, "Statistics": 123, "Active contours": 124, "Level set": 125, "Mathematics": 126, "Feedback": 127, "Distributed computing": 128, "Simulated annealing": 129, "Artificial intelligence": 130, "Classification algorithms": 131, "Deformable models": 132, "Shape": 133, "Speech recognition": 134, "Mutual information": 135, "Redundancy": 136, "Costs": 137, "Support vector machine classification": 138, "Performance analysis": 139, "Algorithm design and analysis": 140, "Cancer": 141, "Face": 142, "Accuracy": 143, "Control systems": 144, "Multi-layer neural network": 145, "Adaptive control": 146, "Nonlinear systems": 147, "Programmable control": 148, "Linear systems": 149, "Optical imaging": 150, "Optical sensors": 151, "Measurement": 152, "Approximation algorithms": 153, "Correlation": 154, "Google": 155, "Scalability": 156, "Mathematical model": 157, "Automobiles": 158, "Sampling methods": 159, "Cost function": 160, "Process control": 161, "Signal processing": 162, "Computer networks": 163, "Signal processing algorithms": 164, "Animals": 165, "Frequency": 166, "Legged locomotion": 167, "Image reconstruction": 168, "Aggregates": 169, "Image restoration": 170, "Markov random fields": 171, "Hidden Markov models": 172, "Magnetic resonance": 173, "Stochastic processes": 174, "State estimation": 175, "Internet of things": 176, "Intelligent sensors": 177, "Mobile communication": 178, "Urban areas": 179, "Vehicles": 180, "Large-scale systems": 181, "Surveillance": 182, "IP networks": 183, "Data analysis": 184, "Information retrieval": 185, "Image retrieval": 186, "Spatial databases": 187, "Recurrent neural networks": 188, "Production": 189, "Delay effects": 190, "Intelligent networks": 191, "Three-dimensional displays": 192, "Databases": 193, "Probability": 194, "Parameter estimation": 195, "Independent component analysis": 196, "Topology": 197, "Network topology": 198, "Linear programming": 199, "Cloud computing": 200, "Mobile handsets": 201, "Data privacy": 202, "Decision trees": 203, "Classification tree analysis": 204, "Optimization": 205, "Feedforward neural networks": 206, "Approximation methods": 207, "Streaming media": 208, "Image texture analysis": 209, "Linear discriminant analysis": 210, "Pattern analysis": 211, "System testing": 212, "Biomedical imaging": 213, "Magnetic resonance imaging": 214, "Two dimensional displays": 215, "Multidimensional systems": 216, "Probability distribution": 217, "Three dimensional displays": 218, "Videos": 219, "Monitoring": 220, "Content based retrieval": 221, "Image processing": 222, "Color": 223, "Geometry": 224, "Noise reduction": 225, "Transform coding": 226, "Boosting": 227, "Voting": 228, "Nearest neighbor searches": 229, "Voltage": 230, "Application software": 231, "Diseases": 232, "Breast cancer": 233, "Cancer detection": 234, "Mammography": 235, "Medical diagnostic imaging": 236, "Robots": 237, "Laboratories": 238, "Image generation": 239, "Heuristic algorithms": 240, "Minimization": 241, "Radio frequency": 242, "Brain": 243, "Pathology": 244, "Target tracking": 245, "Filtering": 246, "Image sequences": 247, "Tracking": 248, "Spline": 249, "Lungs": 250, "Computed tomography": 251, "Image coding": 252, "Big data": 253, "Wireless sensor networks": 254, "Image registration": 255, "Positron emission tomography": 256, "Nonlinear dynamical systems": 257, "Logic gates": 258, "MIMO": 259, "Biology computing": 260, "Supervised learning": 261, "Edge computing": 262, "5G mobile communication": 263, "Mobile computing": 264, "Indexes": 265, "Prediction algorithms": 266, "Hyperspectral sensors": 267, "Hyperspectral imaging": 268, "Remote sensing": 269, "Stability": 270, "Lesions": 271, "Interpolation": 272, "Real time systems": 273, "Video compression": 274, "Head": 275, "Backpropagation": 276, "Power system modeling": 277, "Equations": 278, "Security": 279, "Encoding": 280, "Dictionaries": 281, "Unsupervised learning": 282, "Buildings": 283, "Polynomials": 284, "Cryptography": 285, "Robot sensing systems": 286, "Robot vision systems": 287, "Robot control": 288, "Least squares approximation": 289, "Data visualization": 290, "Estimation": 291, "Covariance matrix": 292, "Wavelet analysis": 293, "Surface treatment": 294, "Time series analysis": 295, "Character recognition": 296, "Simultaneous localization and mapping": 297, "Mobile robots": 298, "Retina": 299, "Diabetes": 300, "Retinopathy": 301, "Noise measurement": 302, "Tensile stress": 303, "Laplace equations": 304, "Downlink": 305, "Throughput": 306, "Tutorials": 307, "Spectral analysis": 308, "Event detection": 309, "Motion segmentation": 310, "Inverse problems": 311, "Electroencephalography": 312, "Convolutional neural networks": 313, "Deep learning": 314, "Array signal processing": 315, "Biometrics": 316, "Fingerprint recognition": 317, "Automation": 318, "Contracts": 319, "Backpropagation algorithms": 320, "System identification": 321, "Statistical analysis": 322, "Data models": 323, "Machine vision": 324, "Statistical distributions": 325, "Physics": 326, "Gold": 327, "Stability analysis": 328, "Image classification": 329, "Fuzzy sets": 330, "Fuzzy control": 331, "Routing": 332, "Multilayer perceptrons": 333, "Gaussian noise": 334, "Signal analysis": 335, "Joints": 336, "Medical services": 337, "Video sequences": 338, "Context modeling": 339, "Acoustics": 340, "Noise": 341, "Scattering": 342, "Games": 343, "Circuits": 344, "Ultrasonic imaging": 345, "Random variables": 346, "Symmetric matrices": 347, "Sensors": 348, "Internet of Things": 349, "Logistics": 350, "Design optimization": 351, "Optimal control": 352, "Wavelet transforms": 353, "Noise robustness": 354, "Servers": 355, "Privacy": 356, "Smart grids": 357, "Electronic mail": 358, "Clustering methods": 359, "Psychology": 360, "Learning (artificial intelligence)": 361, "Trajectory": 362, "Taxonomy": 363, "Atmospheric modeling": 364, "Fuzzy logic": 365, "Uncertainty": 366, "X-ray imaging": 367, "Receivers": 368, "Spatiotemporal phenomena": 369, "Covariance matrices": 370, "History": 371, "Protocols": 372, "Computer security": 373, "Resource management": 374, "Pose estimation": 375, "Graphical models": 376, "Load forecasting": 377, "Runtime": 378, "Signal to noise ratio": 379, "Wireless networks": 380, "Digital signal processing": 381, "Satellites": 382, "Sensor phenomena and characterization": 383, "Image converters": 384, "Euclidean distance": 385, "Social network services": 386, "Emotion recognition": 387, "Laser radar": 388, "Distributed databases": 389, "Sun": 390, "Speech": 391, "Hospitals": 392, "Imaging phantoms": 393, "Transforms": 394, "Gabor filters": 395, "Text recognition": 396, "Actuators": 397, "Reconstruction algorithms": 398, "Arrays": 399, "Video coding": 400, "Switches": 401, "Detection algorithms": 402, "Change detection algorithms": 403, "Electrodes": 404, "Image quality": 405, "Upper bound": 406, "Design methodology": 407, "Roads": 408, "Forecasting": 409, "Discrete cosine transforms": 410, "Video surveillance": 411, "Skeleton": 412, "Reliability": 413, "Informatics": 414, "Internet": 415, "Information analysis": 416, "Surface reconstruction": 417, "Fault diagnosis": 418, "Batteries": 419, "Energy efficiency": 420, "Energy consumption": 421, "Antenna arrays": 422, "Filter bank": 423, "Vocabulary": 424, "Collaboration": 425, "Speckle": 426, "Additive noise": 427, "Electrocardiography": 428, "Matrix decomposition": 429, "Markov processes": 430, "Delay": 431, "Maximum likelihood detection": 432, "Navigation": 433, "Inference algorithms": 434, "OFDM": 435, "Earth": 436, "Image motion analysis": 437, "Analytical models": 438, "Finite impulse response filter": 439, "Nonlinear filters": 440, "Dynamic programming": 441, "Energy management": 442, "Transceivers": 443, "Data communication": 444, "Traffic control": 445, "Object segmentation": 446, "Finite element methods": 447, "Power generation": 448, "Linear matrix inequalities": 449, "Processor scheduling": 450, "Probabilistic logic": 451, "Fourier transforms": 452, "Intrusion detection": 453, "Quality of service": 454, "Time measurement": 455, "Tomography": 456, "Signal design": 457, "Heart": 458, "Imaging": 459, "Big Data": 460, "Power demand": 461, "Synthetic aperture radar": 462, "Geophysical measurements": 463, "Unmanned aerial vehicles": 464, "Encryption": 465, "Indexing": 466, "Software": 467, "Relays": 468, "Function approximation": 469, "Microscopy": 470, "Biopsy": 471, "Load modeling": 472, "Telecommunication traffic": 473, "Authentication": 474, "Delays": 475, "Biomedical engineering": 476, "Service robots": 477, "Information rates": 478, "Breast tumors": 479, "Gaussian processes": 480, "Industrial control": 481, "Vehicle dynamics": 482, "System performance": 483, "Biomedical monitoring": 484, "Monte Carlo methods": 485, "Acoustic noise": 486, "Digital photography": 487, "Gunshot detection systems": 488, "Dynamic scheduling": 489, "Remote monitoring": 490, "Colored noise": 491, "Acoustic signal detection": 492, "Job shop scheduling": 493, "Modems": 494, "Electric vehicles": 495, "Blindness": 496, "Vegetation mapping": 497, "Microgrids": 498, "Microphone arrays": 499, "Charging stations": 500, "Mesh generation": 501, "Reduced order systems": 502, "Geophysics": 503, "Land pollution": 504, "Environmentally friendly manufacturing techniques": 505, "Industrial pollution": 506, "Xenon": 507, "Time difference of arrival": 508, "Acoustic arrays": 509}
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ gradio==3.17.0
2
+ onnxruntime==1.13.1
3
+ torch==2.0.1
4
+ transformers==4.26.0