xuxiaoda/drug_classification
By xuxiaoda · ↓ 0 · ♥ 0 · Updated 2025-04-02
What's in this repo
This page lists the files in xuxiaoda/drug_classification, including drug_classifier.onnx, model.onnx, model_quantized.onnx and more.
- 4 ONNX models (.onnx files)
- 16 files, including 7 .json, 4 .onnx, 2 .md, 2 .txt
- Last updated 2025-04-02
ONNX files
| File | Size | Download |
|---|---|---|
| drug_classifier.onnx | — | Download |
| onnx/model.onnx | — | Download |
| onnx/model_quantized.onnx | — | Download |
| trained_model/drug_classifier.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
药品分类模型(ONNX格式)
模型描述
BERT-base微调的药品分类模型,转换为ONNX格式
使用方式
from transformers import AutoTokenizer, pipeline
from onnxruntime import InferenceSession
tokenizer = AutoTokenizer.from_pretrained("您的用户名/模型名")
session = InferenceSession("model.onnx")
# 预处理
inputs = tokenizer("I have a headache", return_tensors="np")
# 推理
outputs = session.run(None, dict(inputs))
predicted_id = outputs[0].argmax()
##前端使用方式
Transformers.js Example
# Transformers.js in Browser
Model info
text-classification
transformers
transformers
onnx
bert
text-classification
pharmacy
drug-classification
en
license:apache-2.0
text-embeddings-inference
endpoints_compatible
region:us
↓ 0
♥ 0
Created: 2025-04-02
Updated: 2025-04-02
View on Hugging FaceFiles (16)
.gitattributes
README.md
config.json
drug_classifier.onnx
ONNX
onnx/model.onnx
ONNX
onnx/model_quantized.onnx
ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
trained_model/README.md
trained_model/config.json
trained_model/drug_classifier.onnx
ONNX
trained_model/special_tokens_map.json
trained_model/tokenizer_config.json
trained_model/vocab.txt
vocab.txt
Related models
More from xuxiaoda
No other models by this author.